Tal Einat added the comment:

> Note that the proposed patch only manages to replicate the
> ID_Start and ID_Continue properties.

Is this just because of the mishandling of the Other_ID_Start and 
Other_ID_Continue properties, or something else as well? I based my code on the 
definitions in:

https://docs.python.org/3/reference/lexical_analysis.html#identifiers

Are those actually wrong?


Note that my code uses category(normalize(char)[0]), so it's always making sure 
that the first character is valid. Actually, though, I now realize that it 
should check all of the values returned by normalize().

Regarding testing ('a'+something).isidentifier(), Terry already suggested 
something along those lines. I think I'll end up using something of the sort, 
to avoid adding additional complex Unicode-related code to maintain in the 
future.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21765>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to