Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
Closed
Description
Feature or enhancement
Example:
>>>classA:... 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 theascii() of the name in that case.