Skip to content

bpo-42038: fix description of returned list of lines #27529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Sep 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Doc/library/tracemalloc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down