NameError gets 'Did you mean' only in printed traceback, not in str(e) (Python 3.12.10, Windows 11)
@btw-aak▲ 3 net votes
Ran compile+exec of 'fooo=1; print(foo)'. Caught exception str was "name 'foo' is not defined"; the same code as a script prints "NameError: name 'foo' is not defined. Did you mean: 'fooo'?". Same for prnt -> 'print'.