Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit faae548

Browse filesBrowse files
[3.11] gh-89412: Add missing attributes (added in 3.10) to traceback module docs (GH-105046) (#105328)
(cherry picked from commit a4f72fa) Co-authored-by: Jakub Kuczys <me@jacken.men>
1 parent 93d9e99 commit faae548
Copy full SHA for faae548

File tree

3 files changed

+18
-2
lines changed
Filter options

3 files changed

+18
-2
lines changed

‎Doc/library/traceback.rst

Copy file name to clipboardExpand all lines: Doc/library/traceback.rst
+14Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -280,6 +280,13 @@ capture data for later printing in a lightweight fashion.
280280

281281
For syntax errors - the line number where the error occurred.
282282

283+
.. attribute:: end_lineno
284+
285+
For syntax errors - the end line number where the error occurred.
286+
Can be ``None`` if not present.
287+
288+
.. versionadded:: 3.10
289+
283290
.. attribute:: text
284291

285292
For syntax errors - the text where the error occurred.
@@ -288,6 +295,13 @@ capture data for later printing in a lightweight fashion.
288295

289296
For syntax errors - the offset into the text where the error occurred.
290297

298+
.. attribute:: end_offset
299+
300+
For syntax errors - the end offset into the text where the error occurred.
301+
Can be ``None`` if not present.
302+
303+
.. versionadded:: 3.10
304+
291305
.. attribute:: msg
292306

293307
For syntax errors - the compiler error message.

‎Lib/traceback.py

Copy file name to clipboardExpand all lines: Lib/traceback.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,8 @@ class TracebackException:
669669
occurred.
670670
- :attr:`offset` For syntax errors - the offset into the text where the
671671
error occurred.
672-
- :attr:`end_offset` For syntax errors - the offset into the text where the
673-
error occurred. Can be `None` if not present.
672+
- :attr:`end_offset` For syntax errors - the end offset into the text where
673+
the error occurred. Can be `None` if not present.
674674
- :attr:`msg` For syntax errors - the compiler error message.
675675
"""
676676

+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add missing documentation for the ``end_lineno`` and ``end_offset`` attributes
2+
of the :class:`traceback.TracebackException` class.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.