summaryrefslogtreecommitdiffstats
path: root/Doc/whatsnew/3.10.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/whatsnew/3.10.rst')
-rw-r--r--Doc/whatsnew/3.10.rst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 9ae9fe8..4695c0e 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -273,6 +273,23 @@ have been incorporated. Some of the most notable ones:
(Contributed by Pablo Galindo in :issue:`41064`)
+IndentationErrors
+~~~~~~~~~~~~~~~~~
+
+Many :exc:`IndentationError` exceptions now have more context regarding what kind of block
+was expecting an indentation, including the location of the statement:
+
+.. code-block:: python
+
+ >>> def foo():
+ ... if lel:
+ ... x = 2
+ File "<stdin>", line 3
+ x = 2
+ ^
+ IndentationError: expected an indented block after 'if' statement in line 2
+
+
AttributeErrors
~~~~~~~~~~~~~~~