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

Steven D'Aprano report at bugs.python.org
Sun Aug 22 20:13:53 EDT 2021


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Eric, I think you may have been too hasty to close this as "not a bug".

It has tripped people up before. See #41542 which has also been closed (I also think prematurely).

We normalise variable names with NFKC, so we should normalise the values in __all__ as well, at least when doing an import.

Note that this is different from #42680 where the right answer is just to document. We shouldn't normalise strings as dict keys.

----------
nosy: +steven.daprano

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


More information about the Python-bugs-list mailing list