[Python-checkins] cpython (merge 3.3 -> default): merge
raymond.hettinger
python-checkins at python.org
Sat Mar 23 16:22:21 CET 2013
http://hg.python.org/cpython/rev/f97a9bdef27a
changeset: 82912:f97a9bdef27a
parent: 82905:fd7f99e662b7
parent: 82911:a7fe48dfbfe9
user: Raymond Hettinger <python at rcn.com>
date: Sat Mar 23 08:21:52 2013 -0700
summary:
merge
files:
Doc/library/stdtypes.rst | 2 ++
Objects/unicodeobject.c | 5 ++++-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -1627,6 +1627,8 @@
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()
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -11369,7 +11369,10 @@
"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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list