This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dennis Sweeney
Recipients Dennis Sweeney, pablogsal, xtreak, xxm
Date 2021-11-17.05:58:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1637128686.84.0.847391268427.issue45826@roundup.psfhosted.org>
In-reply-to
Content
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?
History
Date User Action Args
2021-11-17 05:58:06Dennis Sweeneysetrecipients: + Dennis Sweeney, pablogsal, xtreak, xxm
2021-11-17 05:58:06Dennis Sweeneysetmessageid: <1637128686.84.0.847391268427.issue45826@roundup.psfhosted.org>
2021-11-17 05:58:06Dennis Sweeneylinkissue45826 messages
2021-11-17 05:58:06Dennis Sweeneycreate