This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author flox
Recipients flox, rhettinger
Date 2013-03-17.18:38:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1363545484.41.0.0966355836475.issue17447@psf.upfronthosting.co.za>
In-reply-to
Content
According to the documentation, the reserved words are classified as identifiers:
http://docs.python.org/3/reference/lexical_analysis.html#keywords

There's an easy workaround:

>>> from keyword import iskeyword
>>> def is_valid_identifier(s):
...     return s.isidentifier() and not iskeyword(s)
... 
>>> is_valid_identifier('def')
False
History
Date User Action Args
2013-03-17 18:38:04floxsetrecipients: + flox, rhettinger
2013-03-17 18:38:04floxsetmessageid: <1363545484.41.0.0966355836475.issue17447@psf.upfronthosting.co.za>
2013-03-17 18:38:04floxlinkissue17447 messages
2013-03-17 18:38:04floxcreate