summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.12.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/whatsnew/3.12.rst')
-rw-r--r--Doc/whatsnew/3.12.rst12
1 files changed, 12 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.12.rst b/Doc/whatsnew/3.12.rst
index 18751f5..a943256 100644
--- a/Doc/whatsnew/3.12.rst
+++ b/Doc/whatsnew/3.12.rst
@@ -70,6 +70,18 @@ Important deprecations, removals or restrictions:
* :pep:`623`, Remove wstr from Unicode
+Improved Error Messages
+=======================
+
+* Improve the :exc:`SyntaxError` error message when the user types ``import x
+ from y`` instead of ``from y import x``. Contributed by Pablo Galindo in :gh:`98931`.
+
+ >>> import a.y.z from b.y.z
+ Traceback (most recent call last):
+ File "<stdin>", line 1
+ import a.y.z from b.y.z
+ ^^^^^^^^^^^^^^^^^^^^^^^
+ SyntaxError: Did you mean to use 'from ... import ...' instead?
New Features
============