[issue40596] str.isidentifier() does not work with non-BMP non-canonicalized strings on Windows

Serhiy Storchaka report at bugs.python.org
Tue May 12 03:40:30 EDT 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

I am not sure that changes in issue39500 was correct. It is easier to catch a bug if crash consistently when you pass a non-canonicalized strings then if silently return a wrong result for specific input on particular platform.

Alternatively, you could reimplement correct handling of surrogate pairs in  PyUnicode_IsIdentifier().

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40596>
_______________________________________


More information about the Python-bugs-list mailing list