Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Python 3.10 added NameError and AttributeError suggestions in raised exceptions, in the form of:
>>> dimTraceback (most recent call last): File "<stdin>", line 1, in <module>NameError: name 'dim' is not defined. Did you mean: 'dir'?
This is implemented inPython/suggestions.c and unavailable in the pure Python implementation of traceback formatting inLib/traceback.py. This makes the output of both different, which is problematic for tooling usingtraceback.py, as well as for alternative implementations of Python like PyPy and GraalPy.
Let's implement the equivalent ofsuggestions.c inLib/traceback.py to bring both in line.