We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e02f1e2 commit be31ecfCopy full SHA for be31ecf
Doc/whatsnew/3.12.rst
@@ -106,6 +106,16 @@ Improved Error Messages
106
^^^^^^^^^^^^^^^^^^^^^^^
107
SyntaxError: Did you mean to use 'from ... import ...' instead?
108
109
+* :exc:`ImportError` exceptions raised from failed ``from <module> import
110
+ <name>`` statements now include suggestions for the value of ``<name>`` based on the
111
+ available names in ``<module>``. Contributed by Pablo Galindo in :gh:`91058`.
112
+
113
+ >>> from collections import chainmap
114
+ Traceback (most recent call last):
115
+ File "<stdin>", line 1, in <module>
116
+ ImportError: cannot import name 'chainmap' from 'collections'. Did you mean: 'ChainMap'?
117
118
119
New Features
120
============
121
0 commit comments