diff options
| author | Sanyam Khurana <8039608+CuriousLearner@users.noreply.github.com> | 2018-10-08 12:23:32 +0530 |
|---|---|---|
| committer | Carol Willing <carolcode@willingconsulting.com> | 2018-10-08 12:23:32 +0530 |
| commit | ffc5a14d00db984c8e72c7b67da8a493e17e2c14 (patch) | |
| tree | 9baa64994bc84ab4351d4bbabbda67105a47ccbb /Objects/unicodeobject.c | |
| parent | 656d52dbfde3223cd2a3525d652b6cccb02fa991 (diff) | |
| download | cpython-git-ffc5a14d00db984c8e72c7b67da8a493e17e2c14.tar.gz | |
bpo-33014: Clarify str.isidentifier docstring (GH-6088)
* bpo-33014: Clarify str.isidentifier docstring
* bpo-33014: Add code example in isidentifier documentation
Diffstat (limited to 'Objects/unicodeobject.c')
| -rw-r--r-- | Objects/unicodeobject.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c index a797f838eb..16dd3d19e8 100644 --- a/Objects/unicodeobject.c +++ b/Objects/unicodeobject.c @@ -12100,13 +12100,13 @@ str.isidentifier as unicode_isidentifier Return True if the string is a valid Python identifier, False otherwise. -Use keyword.iskeyword() to test for reserved identifiers such as "def" and -"class". +Call keyword.iskeyword(s) to test whether string s is a reserved identifier, +such as "def" or "class [clinic start generated code]*/ static PyObject * unicode_isidentifier_impl(PyObject *self) -/*[clinic end generated code: output=fe585a9666572905 input=916b0a3c9f57e919]*/ +/*[clinic end generated code: output=fe585a9666572905 input=2fb643aafbcf0e1c]*/ { return PyBool_FromLong(PyUnicode_IsIdentifier(self)); } |
