]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #24148: Fix incorrect Stats.sort_stats() example.
authorBerker Peksag <berker.peksag@gmail.com>
Fri, 5 Jun 2015 11:48:29 +0000 (14:48 +0300)
committerBerker Peksag <berker.peksag@gmail.com>
Fri, 5 Jun 2015 11:48:29 +0000 (14:48 +0300)
"cum" is not a valid argument.

Patch by Brandon Milam.

Doc/library/profile.rst

index 6a6c4893f8e80fc2f3f0a6140a4be7cacb00c325..2928821d55079dbe38727546514545f5adb3de44 100644 (file)
@@ -172,7 +172,7 @@ This will sort all the statistics by file name, and then print out statistics
 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