summaryrefslogtreecommitdiff
path: root/devdocs/python~3.12/library%2Fkeyword.html
diff options
context:
space:
mode:
Diffstat (limited to 'devdocs/python~3.12/library%2Fkeyword.html')
-rw-r--r--devdocs/python~3.12/library%2Fkeyword.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/devdocs/python~3.12/library%2Fkeyword.html b/devdocs/python~3.12/library%2Fkeyword.html
new file mode 100644
index 00000000..81fc8059
--- /dev/null
+++ b/devdocs/python~3.12/library%2Fkeyword.html
@@ -0,0 +1,18 @@
+ <span id="keyword-testing-for-python-keywords"></span><h1>keyword — Testing for Python keywords</h1> <p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.12/Lib/keyword.py">Lib/keyword.py</a></p> <p>This module allows a Python program to determine if a string is a <a class="reference internal" href="../reference/lexical_analysis#keywords"><span class="std std-ref">keyword</span></a> or <a class="reference internal" href="../reference/lexical_analysis#soft-keywords"><span class="std std-ref">soft keyword</span></a>.</p> <dl class="py function"> <dt class="sig sig-object py" id="keyword.iskeyword">
+<code>keyword.iskeyword(s)</code> </dt> <dd>
+<p>Return <code>True</code> if <em>s</em> is a Python <a class="reference internal" href="../reference/lexical_analysis#keywords"><span class="std std-ref">keyword</span></a>.</p> </dd>
+</dl> <dl class="py data"> <dt class="sig sig-object py" id="keyword.kwlist">
+<code>keyword.kwlist</code> </dt> <dd>
+<p>Sequence containing all the <a class="reference internal" href="../reference/lexical_analysis#keywords"><span class="std std-ref">keywords</span></a> defined for the interpreter. If any keywords are defined to only be active when particular <a class="reference internal" href="__future__#module-__future__" title="__future__: Future statement definitions"><code>__future__</code></a> statements are in effect, these will be included as well.</p> </dd>
+</dl> <dl class="py function"> <dt class="sig sig-object py" id="keyword.issoftkeyword">
+<code>keyword.issoftkeyword(s)</code> </dt> <dd>
+<p>Return <code>True</code> if <em>s</em> is a Python <a class="reference internal" href="../reference/lexical_analysis#soft-keywords"><span class="std std-ref">soft keyword</span></a>.</p> <div class="versionadded"> <p><span class="versionmodified added">New in version 3.9.</span></p> </div> </dd>
+</dl> <dl class="py data"> <dt class="sig sig-object py" id="keyword.softkwlist">
+<code>keyword.softkwlist</code> </dt> <dd>
+<p>Sequence containing all the <a class="reference internal" href="../reference/lexical_analysis#soft-keywords"><span class="std std-ref">soft keywords</span></a> defined for the interpreter. If any soft keywords are defined to only be active when particular <a class="reference internal" href="__future__#module-__future__" title="__future__: Future statement definitions"><code>__future__</code></a> statements are in effect, these will be included as well.</p> <div class="versionadded"> <p><span class="versionmodified added">New in version 3.9.</span></p> </div> </dd>
+</dl> <div class="_attribution">
+ <p class="_attribution-p">
+ &copy; 2001&ndash;2023 Python Software Foundation<br>Licensed under the PSF License.<br>
+ <a href="https://docs.python.org/3.12/library/keyword.html" class="_attribution-link">https://docs.python.org/3.12/library/keyword.html</a>
+ </p>
+</div>