Feature or enhancement
Example:
>>> class A:
... attrA = 1
... attr𝔹 = 2
...
>>> getattr(A, 'attrB')
2
>>> getattr(A, 'attr𝔹')
AttributeError: type object 'A' has no attribute 'attr𝔹'. Did you mean: 'attrA'?
The correct suggestion is 'attrB', not 'attrA'.
Every time Python outputs suggestion for the name, it should first check whether the name is normalized. If it is not, Python should check if the normalized name exists, and suggest the normalized version, otherwise suggest names similar to the normalized version. It may be tricky, because the normalized came can look exactly like not normalized name (for example, 'µ' ('\xb5') and 'μ' ('\u03bc')). So we need to output also the ascii() of the name in that case.
Linked PRs
Feature or enhancement
Example:
The correct suggestion is 'attrB', not 'attrA'.
Every time Python outputs suggestion for the name, it should first check whether the name is normalized. If it is not, Python should check if the normalized name exists, and suggest the normalized version, otherwise suggest names similar to the normalized version. It may be tricky, because the normalized came can look exactly like not normalized name (for example, 'µ' (
'\xb5') and 'μ' ('\u03bc')). So we need to output also theascii()of the name in that case.Linked PRs