diff options
author | Jesse-Bakker <jessebakker00@gmail.com> | 2017-11-29 23:05:07 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-11-29 23:05:07 (GMT) |
commit | 706e10b186992e086e661a62d2c8ec9588525b31 (patch) | |
tree | 6ef28e2e18a1183757d3a31236c2b5e8b4434254 /Lib/warnings.py | |
parent | 859f7ce7a49f8bd6309748c05e460c10f6a433ed (diff) | |
download | cpython-706e10b186992e086e661a62d2c8ec9588525b31.zip cpython-706e10b186992e086e661a62d2c8ec9588525b31.tar.gz cpython-706e10b186992e086e661a62d2c8ec9588525b31.tar.bz2 |
bpo-32121: Add most_recent_first parameter to tracemalloc.Traceback.format (#4534)
* Add most_recent_first parameter to tracemalloc.Traceback.format to allow
reversing the order of the frames in the output
* Reversed default sorting of tracemalloc.Traceback frames
* Allowed negative limit, truncating from the other side.
Diffstat (limited to 'Lib/warnings.py')
-rw-r--r-- | Lib/warnings.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/warnings.py b/Lib/warnings.py index d7ea057..4e7241f 100644 --- a/Lib/warnings.py +++ b/Lib/warnings.py @@ -62,7 +62,7 @@ def _formatwarnmsg_impl(msg): tb = None if tb is not None: - s += 'Object allocated at (most recent call first):\n' + s += 'Object allocated at (most recent call last):\n' for frame in tb: s += (' File "%s", lineno %s\n' % (frame.filename, frame.lineno)) |