Python 3.10 added suggestions for AttributeError and NameError in the error messages. It seems the suggestions are not stored in the exception object but calculated when Error is displayed. There is a note that that this won't work with IPython but it will be good to see if it's feasible. Opening an issue for discussion.
Thanks for opening. If it's not stored in the exception then it should not be too hard to (re)-implement.
The best would be to leverage something like friendly-traceback the offers similar suggestions, or just extends the code in UltraTB.py to extend the message if it's AttributeError or NameError.
Marking as "good first issue" as it should not be too hard.
Python 3.10 added suggestions for AttributeError and NameError in the error messages. It seems the suggestions are not stored in the exception object but calculated when Error is displayed. There is a note that that this won't work with IPython but it will be good to see if it's feasible. Opening an issue for discussion.
https://bugs.python.org/issue38530
https://docs.python.org/3/whatsnew/3.10.html#attributeerrors
Discussion on HN : https://news.ycombinator.com/item?id=29909799
The text was updated successfully, but these errors were encountered: