[issue33705] Unicode is normalised after keywords are checked for

2018-05-30 Thread Steven D'Aprano
Steven D'Aprano added the comment: Possibly the correct term is canonicalisation rather than normalisation, although I think the two are interchangeable. -- ___ Python tracker __

[issue33705] Unicode is normalised after keywords are checked for

2018-05-30 Thread Steven D'Aprano
New submission from Steven D'Aprano : There is a loophole in the Unicode normalisation which allows the creation of names matching keywords. class Spam: locals()['if'] = 1 Spam.𝐢𝐟# U+1D422 U+1D41F # returns 1 Those two characters are 'MATHEMATICAL BOLD SMALL I' and 'MATHEMATICAL BOLD