[issue38612] some non-ascii charcters link to same identifier/data

Steven D'Aprano report at bugs.python.org
Mon Oct 28 09:21:05 EDT 2019


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

This is an intentional feature: identifiers are normalised using NFKC normalization.

    py> from dis import dis
    py> dis(compile('ϕ=1', '', 'single'))
      1           0 LOAD_CONST               0 (1)
                  3 STORE_NAME               0 (φ)
                  6 LOAD_CONST               1 (None)
                  9 RETURN_VALUE
    py> from unicodedata import normalize
    py> normalize('NFKC', 'ϕ')
    'φ'


So not a bug.

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

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


More information about the Python-bugs-list mailing list