[docs] [issue33014] Clarify str.isidentifier docstring; fix keyword.iskeyword docstring

Cheryl Sabella report at bugs.python.org
Mon Mar 12 16:38:13 EDT 2018


Cheryl Sabella <chekat2 at gmail.com> added the comment:

Too bad we couldn't do:

iskeyword = frozenset(kwlist).__contains__
iskeyword.__doc__ = 'Test whether a string is a reserved identifier.'

But I'm sure there are reasons for this:
AttributeError: attribute '__doc__' of 'builtin_function_or_method' objects is not writable

----------
nosy: +csabella

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33014>
_______________________________________


More information about the docs mailing list