Skip to content

Commit 5cff3a1

Browse files
committed
Fix a few more stale docs and typos.
1 parent 04baa56 commit 5cff3a1

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Doc/library/traceback.rst

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,9 @@ Module-Level Functions
149149
the same meaning as for :func:`print_tb`. A "pre-processed" stack trace
150150
entry is a :class:`FrameSummary` object containing attributes
151151
:attr:`~FrameSummary.filename`, :attr:`~FrameSummary.lineno`,
152-
:attr:`~FrameSummary.name`, and :attr:`~FrameSummary.line` representing the
152+
:attr:`~FrameSummary.name`, :attr:`~FrameSummary.line`,
153+
:attr:`~FrameSummary.end_lineno`, :attr:`~FrameSummary.colno`, and
154+
:attr:`~FrameSummary.end_colno` representing the
153155
information that is usually printed for a stack trace.
154156

155157

@@ -181,7 +183,7 @@ Module-Level Functions
181183
.. function:: format_exception_only(exc, /[, value], *, show_group=False)
182184

183185
Format the exception part of a traceback using an exception value such as
184-
given by :data:`sys.last_value`. The return value is a list of strings, each
186+
given by :data:`sys.last_exc`. The return value is a list of strings, each
185187
ending in a newline. The list contains the exception's message, which is
186188
normally a single string; however, for :exc:`SyntaxError` exceptions, it
187189
contains several lines that (when printed) display detailed information
@@ -347,7 +349,7 @@ the module-level functions described above.
347349

348350
.. attribute:: exc_type
349351

350-
The class of the original traceback.
352+
The class of the original exception.
351353

352354
.. deprecated:: 3.13
353355

@@ -391,7 +393,7 @@ the module-level functions described above.
391393

392394
For syntax errors - the compiler error message.
393395

394-
.. classmethod:: from_exception(exc, *, limit=None, lookup_lines=True, capture_locals=False)
396+
.. classmethod:: from_exception(exc, *, limit=None, lookup_lines=True, capture_locals=False, compact=False, max_group_width=15, max_group_depth=10)
395397

396398
Capture an exception for later rendering. *limit*, *lookup_lines* and
397399
*capture_locals* are as for the :class:`StackSummary` class.

Lib/traceback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ class FrameSummary:
293293
active when the frame was captured.
294294
- :attr:`name` The name of the function or method that was executing
295295
when the frame was captured.
296-
- :attr:`line` The text from the linecache module for the
296+
- :attr:`line` The text from the linecache module for the line of
297297
code that was running when the frame was captured.
298298
- :attr:`locals` Either None if locals were not supplied, or a dict
299299
mapping the name to the repr() of the variable.

0 commit comments

Comments
 (0)