File tree 1 file changed +9
-0
lines changed
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:
75
75
Improved Error Messages
76
76
=======================
77
77
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
+
78
87
* Improve the error suggestion for :exc: `NameError ` exceptions for instances.
79
88
Now if a :exc: `NameError ` is raised in a method and the instance has an
80
89
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