summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2013-03-23 15:21:12 (GMT)
committerRaymond Hettinger <python@rcn.com>2013-03-23 15:21:12 (GMT)
commit378170d5d95256ec17e20a5ce7dc1b6c99213874 (patch)
tree9052ddc7b51ff2e6a1d6abfe304ac1d52ed6324b /Doc
parentdaa42c778e101fa158f89e3a8c5418be5eef90c6 (diff)
downloadcpython-378170d5d95256ec17e20a5ce7dc1b6c99213874.zip
cpython-378170d5d95256ec17e20a5ce7dc1b6c99213874.tar.gz
cpython-378170d5d95256ec17e20a5ce7dc1b6c99213874.tar.bz2
Issue 17447: Clarify that str.isidentifier doesn't check for reserved keywords.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 7e5f04f..60df11d 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1627,6 +1627,8 @@ expression support in the :mod:`re` module).
Return true if the string is a valid identifier according to the language
definition, section :ref:`identifiers`.
+ Use :func:`keyword.iskeyword` to test for reserved identifiers such as
+ :keyword:`def` and :keyword:`class`.
.. method:: str.islower()