summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Doc/library/traceback.rst14
-rw-r--r--Lib/traceback.py4
-rw-r--r--Misc/NEWS.d/next/Documentation/2023-05-28-19-08-42.gh-issue-89412.j4cg7K.rst2
3 files changed, 18 insertions, 2 deletions
diff --git a/Doc/library/traceback.rst b/Doc/library/traceback.rst
index ab51cb9..676b9c8 100644
--- a/Doc/library/traceback.rst
+++ b/Doc/library/traceback.rst
@@ -259,6 +259,13 @@ capture data for later printing in a lightweight fashion.
For syntax errors - the line number where the error occurred.
+ .. attribute:: end_lineno
+
+ For syntax errors - the end line number where the error occurred.
+ Can be ``None`` if not present.
+
+ .. versionadded:: 3.10
+
.. attribute:: text
For syntax errors - the text where the error occurred.
@@ -267,6 +274,13 @@ capture data for later printing in a lightweight fashion.
For syntax errors - the offset into the text where the error occurred.
+ .. attribute:: end_offset
+
+ For syntax errors - the end offset into the text where the error occurred.
+ Can be ``None`` if not present.
+
+ .. versionadded:: 3.10
+
.. attribute:: msg
For syntax errors - the compiler error message.
diff --git a/Lib/traceback.py b/Lib/traceback.py
index d6a010f..51446f3 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -481,8 +481,8 @@ class TracebackException:
occurred.
- :attr:`offset` For syntax errors - the offset into the text where the
error occurred.
- - :attr:`end_offset` For syntax errors - the offset into the text where the
- error occurred. Can be `None` if not present.
+ - :attr:`end_offset` For syntax errors - the end offset into the text where
+ the error occurred. Can be `None` if not present.
- :attr:`msg` For syntax errors - the compiler error message.
"""
diff --git a/Misc/NEWS.d/next/Documentation/2023-05-28-19-08-42.gh-issue-89412.j4cg7K.rst b/Misc/NEWS.d/next/Documentation/2023-05-28-19-08-42.gh-issue-89412.j4cg7K.rst
new file mode 100644
index 0000000..00937e5
--- /dev/null
+++ b/Misc/NEWS.d/next/Documentation/2023-05-28-19-08-42.gh-issue-89412.j4cg7K.rst
@@ -0,0 +1,2 @@
+Add missing documentation for the ``end_lineno`` and ``end_offset`` attributes
+of the :class:`traceback.TracebackException` class.