[issue23091] unpacked keyword arguments are not unicode normalized

S. Andrew Sheppard report at bugs.python.org
Sat Dec 20 06:10:10 CET 2014


S. Andrew Sheppard added the comment:

Fair enough.  For future reference by anyone coming across this issue, here's a simplified version of the workaround I used:

from unicodedata import normalize
def normalize_keys(data):
    return {
        normalize('NFKC', key): value
        for key, value in data.items()
    }

def test(μ):
    print(μ)

>>> test(**normalize_keys({'µ': "test4"}))
test4

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23091>
_______________________________________


More information about the Python-bugs-list mailing list