[issue17447] str.identifier shouldn't accept Python keywords

Serhiy Storchaka report at bugs.python.org
Sun Mar 17 21:40:38 CET 2013


Serhiy Storchaka added the comment:

Hmm. I were going to use this method for re's named group (see issue14462). There is a possibility that some third-party code uses it for checking on general Unicode-aware identifiers. The language specifification says that keywords is a subset of identifiers. However in most places in stdlib (collections.namedtuple, unittest.mock, inspect.Parameter) is_usable_identifier() should be used instead of isidentifier().

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17447>
_______________________________________


More information about the Python-bugs-list mailing list