diff options
author | Raymond Hettinger <python@rcn.com> | 2013-03-23 15:21:12 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2013-03-23 15:21:12 (GMT) |
commit | 378170d5d95256ec17e20a5ce7dc1b6c99213874 (patch) | |
tree | 9052ddc7b51ff2e6a1d6abfe304ac1d52ed6324b /Objects | |
parent | daa42c778e101fa158f89e3a8c5418be5eef90c6 (diff) | |
download | cpython-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 'Objects')
-rw-r--r-- | Objects/unicodeobject.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index 9f269a5..c21e80c 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -11493,7 +11493,10 @@ PyDoc_STRVAR(isidentifier__doc__, "S.isidentifier() -> bool\n\ \n\ Return True if S is a valid identifier according\n\ -to the language definition."); +to the language definition.\n\ +\n\ +Use keyword.iskeyword() to test for reserved identifiers\n\ +such as \"def\" and \"class\".\n"); static PyObject* unicode_isidentifier(PyObject *self) |