[issue13821] misleading return from isidentifier

Benjamin Peterson report at bugs.python.org
Thu Jan 19 02:10:04 CET 2012


Benjamin Peterson <benjamin at python.org> added the comment:

2012/1/18 Jim Jewett <report at bugs.python.org>:
>
> Jim Jewett <jimjjewett at gmail.com> added the comment:
>
> @Benjamin -- the catch is, if it isn't already in NFKC form, then python won't really accept it as an identifier.  Sometimes it will silently canonicalize it for you so that it seems to work, but other times it won't.  And program calling isidentifier is likely to be a program that uses the strings directly for access, instead of always routing them through the parser.

AFAIK, the only time it will "silently" canonicalize it for you is
parsing. Even if it wasn't, you can't say it's not an identifier, it's
just not normalized.

----------

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


More information about the Python-bugs-list mailing list