bpo-42038: fix description of returned list of lines (GH-27529)

This commit is contained in:
andrei kulakov 2021-09-17 18:24:55 -04:00 committed by GitHub
parent d22a700091
commit aca0e08c5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -740,12 +740,12 @@ Traceback
.. method:: format(limit=None, most_recent_first=False)
Format the traceback as a list of lines with newlines. Use the
:mod:`linecache` module to retrieve lines from the source code.
If *limit* is set, format the *limit* most recent frames if *limit*
is positive. Otherwise, format the ``abs(limit)`` oldest frames.
If *most_recent_first* is ``True``, the order of the formatted frames
is reversed, returning the most recent frame first instead of last.
Format the traceback as a list of lines. Use the :mod:`linecache` module to
retrieve lines from the source code. If *limit* is set, format the *limit*
most recent frames if *limit* is positive. Otherwise, format the
``abs(limit)`` oldest frames. If *most_recent_first* is ``True``, the order
of the formatted frames is reversed, returning the most recent frame first
instead of last.
Similar to the :func:`traceback.format_tb` function, except that
:meth:`.format` does not include newlines.