File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,15 @@ Important deprecations, removals or restrictions:
7575Improved Error Messages
7676=======================
7777
78+ * Modules from the standard library are now potentially suggested as part of
79+ the error messages displayed by the interpreter when a :exc: `NameError ` is
80+ raised to the top level. Contributed by Pablo Galindo in :gh: `98254 `.
81+
82+ >>> sys.version_info
83+ Traceback (most recent call last):
84+ File "<stdin>", line 1, in <module>
85+ NameError: name 'sys' is not defined. Did you forget to import 'sys'?
86+
7887* Improve the error suggestion for :exc: `NameError ` exceptions for instances.
7988 Now if a :exc: `NameError ` is raised in a method and the instance has an
8089 attribute that's exactly equal to the name in the exception, the suggestion
You can’t perform that action at this time.
0 commit comments