[issue44981] `module has no attribute` when `__all__` includes certain unicode characters

Eric V. Smith report at bugs.python.org
Sun Aug 22 19:05:27 EDT 2021


Eric V. Smith <eric at trueblade.com> added the comment:

Python normalizes identifiers with NFKC (see PEP 3131):

>>> e0 = "ϵ"
>>> import unicodedata
>>> e1 = unicodedata.normalize("NFKC", e0)
>>> e0 == e1
False
>>> unicodedata.name(e0)
'GREEK LUNATE EPSILON SYMBOL'
>>> unicodedata.name(e1)
'GREEK SMALL LETTER EPSILON'

If you use GREEK SMALL LETTER EPSILON as your identifier, you should be okay.

----------
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

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


More information about the Python-bugs-list mailing list