Identifier normalization: Why is the micro sign converted into the Greek letter mu?
问题 I just stumbled upon the following odd situation: >>> class Test: µ = 'foo' >>> Test.µ 'foo' >>> getattr(Test, 'µ') Traceback (most recent call last): File "<pyshell#4>", line 1, in <module> getattr(Test, 'µ') AttributeError: type object 'Test' has no attribute 'µ' >>> 'µ'.encode(), dir(Test)[-1].encode() (b'\xc2\xb5', b'\xce\xbc') The character I entered is always the µ sign on the keyboard, but for some reason it gets converted. Why does this happen? 回答1: There are two different characters