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.
diff --git a/Doc/whatsnew/3.7.rst b/Doc/whatsnew/3.7.rst
index e4600fe..5c00159 100644
--- a/Doc/whatsnew/3.7.rst
+++ b/Doc/whatsnew/3.7.rst
@@ -751,6 +751,10 @@
avoid a warning escape them with a backslash.
(Contributed by Serhiy Storchaka in :issue:`30349`.)
+* :class:`tracemalloc.Traceback` frames are now sorted from oldest to most
+ recent to be more consistent with :mod:`traceback`.
+ (Contributed by Jesse Bakker in :issue:`32121`.)
+
.. _Unicode Technical Standard #18: https://unicode.org/reports/tr18/