Message184391
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 |
|
Date |
User |
Action |
Args |
2013-03-17 18:38:04 | flox | set | recipients:
+ flox, rhettinger |
2013-03-17 18:38:04 | flox | set | messageid: <1363545484.41.0.0966355836475.issue17447@psf.upfronthosting.co.za> |
2013-03-17 18:38:04 | flox | link | issue17447 messages |
2013-03-17 18:38:04 | flox | create | |
|