Seth Woodworth <s...@sethish.com> added the comment:

As described in PEP3131, unicode identifiers are normalized via NFKC before 
being added to the globals, and presumably __all__ as in your example.

You can see what python _did_ add via unicodedata.normalize('NFKC', 'ϕ') which 
returns 'φ'


[ins] In [8]: bytes('φ', 'utf8')                                                
                                                                                
Out[8]: b'\xcf\x86'

[ins] In [9]: bytes('ϕ', 'utf8')                                                
                                                                                
Out[9]: b'\xcf\x95'

The normalized version of Phi, I _can_ add to my globals: 
globals()['φ'] = 'foo'

----------
nosy: +sethwoodworth

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

Reply via email to