[Python-checkins] [3.10] bpo-43914: What's New 3.10: add new SyntaxError attributes (GH-28558) (GH-28562)

ambv webhook-mailer at python.org
Sat Sep 25 05:32:34 EDT 2021


https://github.com/python/cpython/commit/c523022ba8f81a3661b4ac8be81706ed095d5769
commit: c523022ba8f81a3661b4ac8be81706ed095d5769
branch: 3.10
author: Łukasz Langa <lukasz at langa.pl>
committer: ambv <lukasz at langa.pl>
date: 2021-09-25T11:32:26+02:00
summary:

[3.10] bpo-43914: What's New 3.10: add new SyntaxError attributes (GH-28558) (GH-28562)

Co-authored-by: Ken Jin <28750310+Fidget-Spinner at users.noreply.github.com>
(cherry picked from commit 71f8ff45c62bd6b792919ac7c3804a8628ae12cb)

Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>

files:
M Doc/whatsnew/3.10.rst

diff --git a/Doc/whatsnew/3.10.rst b/Doc/whatsnew/3.10.rst
index 21cc56ec7a8ba..c11fe41659c20 100644
--- a/Doc/whatsnew/3.10.rst
+++ b/Doc/whatsnew/3.10.rst
@@ -883,7 +883,12 @@ Other Language Changes
   collisions when creating dictionaries and sets containing multiple NaNs.
   (Contributed by Raymond Hettinger in :issue:`43475`.)
 
-*  A :exc:`SyntaxError` (instead of a :exc:`NameError`) will be raised when deleting the :const:`__debug__` constant. (Contributed by Dong-hee Na in :issue:`45000`.)
+* A :exc:`SyntaxError` (instead of a :exc:`NameError`) will be raised when deleting
+  the :const:`__debug__` constant.  (Contributed by Dong-hee Na in :issue:`45000`.)
+
+* :exc:`SyntaxError` exceptions now have ``end_lineno`` and
+  ``end_offset`` attributes.  They will be ``None`` if not determined.
+  (Contributed by Pablo Galindo in :issue:`43914`.)
 
 New Modules
 ===========



More information about the Python-checkins mailing list