[Python-checkins] cpython (3.4): Close #20814: doc: Fix "Pretty top" example of tracemalloc
larry.hastings
python-checkins at python.org
Mon Mar 17 07:33:17 CET 2014
http://hg.python.org/cpython/rev/027ca483a7e5
changeset: 89784:027ca483a7e5
branch: 3.4
user: Victor Stinner <victor.stinner at gmail.com>
date: Mon Mar 03 11:57:57 2014 +0100
summary:
Close #20814: doc: Fix "Pretty top" example of tracemalloc
files:
Doc/library/tracemalloc.rst | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/Doc/library/tracemalloc.rst b/Doc/library/tracemalloc.rst
--- a/Doc/library/tracemalloc.rst
+++ b/Doc/library/tracemalloc.rst
@@ -200,8 +200,7 @@
# replace "/path/to/module/file.py" with "module/file.py"
filename = os.sep.join(frame.filename.split(os.sep)[-2:])
print("#%s: %s:%s: %.1f KiB"
- % (index, filename, frame.lineno,
- stat.size / 1024))
+ % (index, filename, frame.lineno, stat.size / 1024))
other = top_stats[limit:]
if other:
@@ -215,7 +214,7 @@
# ... run your application ...
snapshot = tracemalloc.take_snapshot()
- display_top(snapshot, 10)
+ display_top(snapshot)
Example of output of the Python test suite::
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list