Python 3.11 is barely out and already the 3.12 alpha has some improvements for NameError messages.I suspect that these will be backported to 3.11 in time for the next release.On Ideas Python Discussion, Pamela Fox suggested that it might be useful to consider potential missing import when a NameError was raised.
[
add
]
[
|
|
...
]