[Python-checkins] cpython (3.4): Issue #24148: Fix incorrect Stats.sort_stats() example.

berker.peksag python-checkins at python.org
Fri Jun 5 13:48:56 CEST 2015


https://hg.python.org/cpython/rev/bfc043eab54e
changeset:   96516:bfc043eab54e
branch:      3.4
parent:      96486:95d1f38e540e
user:        Berker Peksag <berker.peksag at gmail.com>
date:        Fri Jun 05 14:48:29 2015 +0300
summary:
  Issue #24148: Fix incorrect Stats.sort_stats() example.

"cum" is not a valid argument.

Patch by Brandon Milam.

files:
  Doc/library/profile.rst |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst
--- a/Doc/library/profile.rst
+++ b/Doc/library/profile.rst
@@ -172,7 +172,7 @@
 for only the class init methods (since they are spelled with ``__init__`` in
 them).  As one final example, you could try::
 
-   p.sort_stats('time', 'cum').print_stats(.5, 'init')
+   p.sort_stats('time', 'cumulative').print_stats(.5, 'init')
 
 This line sorts statistics with a primary key of time, and a secondary key of
 cumulative time, and then prints out some of the statistics. To be specific, the

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list