diff options
author | Pablo Galindo <Pablogsal@gmail.com> | 2021-06-03 22:52:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-03 22:52:12 (GMT) |
commit | b250f89bb7e05e72a4641d44b988866b919575db (patch) | |
tree | 43d02e145f333ecb25e5afa704783bbf1e8bbc38 /Doc/whatsnew/3.10.rst | |
parent | 3446516ffa92c98519146253153484291947b273 (diff) | |
download | cpython-b250f89bb7e05e72a4641d44b988866b919575db.zip cpython-b250f89bb7e05e72a4641d44b988866b919575db.tar.gz cpython-b250f89bb7e05e72a4641d44b988866b919575db.tar.bz2 |
bpo-44305: Improve syntax error for try blocks without except or finally (GH-26523)
Diffstat (limited to 'Doc/whatsnew/3.10.rst')
-rw-r--r-- | Doc/whatsnew/3.10.rst | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst index 92247e1..bc0f938 100644 --- a/Doc/whatsnew/3.10.rst +++ b/Doc/whatsnew/3.10.rst @@ -274,6 +274,20 @@ have been incorporated. Some of the most notable ones: (Contributed by Pablo Galindo in :issue:`43823`) +* ``try`` blocks without ``except`` or ``finally`` blocks: + + .. code-block:: python + + >>> try + ... x = 2 + ... something = 3 + File "<stdin>", line 3 + something = 3 + ^^^^^^^^^ + SyntaxError: expected 'except' or 'finally' block + + (Contributed by Pablo Galindo in :issue:`44305`) + * Usage of ``=`` instead of ``==`` in comparisons: .. code-block:: python |