This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ramiro
Recipients docs@python, ramiro
Date 2015-05-09.15:19:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
On the documentation page "The Python Profilers" the following example is given:

p.sort_stats('time', 'cum').print_stats(.5, 'init')

This raises a KeyError, because 'cum' is not available as a sort key to pstats.Stats.sort_stats. As per the documentation of this method ( you can either use 'cumulative' or 'cumtime', which both work as expected.

Since 'cumulative' is used a few examples earlier I suggest to use that for consistency.

Tested with the following Python version:

Python 3.4.3 on Ubuntu 15.04
Date User Action Args
2015-05-09 15:19:17ramirosetrecipients: + ramiro, docs@python
2015-05-09 15:19:17ramirosetmessageid: <>
2015-05-09 15:19:17ramirolinkissue24148 messages
2015-05-09 15:19:16ramirocreate