Message406456
Even shorter reproducer:
-----------------------------
try:
aab
except BaseException as E:
E.with_traceback(None)
raise ZeroDivisionError()
-----------------------------
Bisection points to the initial implementation of suggestions.c:
5bf8bf2267cd109970b2d946d43b2e9f71379ba2 is the first bad commit
commit 5bf8bf2267cd109970b2d946d43b2e9f71379ba2
Author: Pablo Galindo <Pablogsal@gmail.com>
Date: Wed Apr 14 15:10:33 2021 +0100
bpo-38530: Offer suggestions on NameError (GH-25397)
When printing NameError raised by the interpreter, PyErr_Display
will offer suggestions of simmilar variable names in the function that the exception
was raised from:
>>> schwarzschild_black_hole = None
>>> schwarschild_black_hole
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'schwarschild_black_hole' is not defined. Did you mean: schwarzschild_black_hole? |
|
Date |
User |
Action |
Args |
2021-11-17 05:58:06 | Dennis Sweeney | set | recipients:
+ Dennis Sweeney, pablogsal, xtreak, xxm |
2021-11-17 05:58:06 | Dennis Sweeney | set | messageid: <1637128686.84.0.847391268427.issue45826@roundup.psfhosted.org> |
2021-11-17 05:58:06 | Dennis Sweeney | link | issue45826 messages |
2021-11-17 05:58:06 | Dennis Sweeney | create | |
|