[issue24148] 'cum' not a valid sort key for pstats.Stats.sort_stats
New submission from ramiro:
On the documentation page "The Python Profilers"
https://docs.python.org/3.4/library/profile.html#instant-user-s-manual 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
(https://docs.python.org/3.4/library/profile.html#the-stats-class) 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
--
assignee: docs@python
components: Documentation
messages: 242812
nosy: docs@python, ramiro
priority: normal
severity: normal
status: open
title: 'cum' not a valid sort key for pstats.Stats.sort_stats
type: enhancement
versions: Python 3.4
___
Python tracker
<http://bugs.python.org/issue24148>
___
___
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5800] make wsgiref.headers.Headers accept empty constructor
Ramiro Batista da Luz added the comment:
I applied the patches for wsgiref.headers and test_headers.py, ran the test
with runtests.sh test_headers.py and it passed.
I also tried the code in the description:
>>> from wsgiref.headers import Headers
>>> headers = Headers()
>>> headers.add_header('Content-Type', 'text/plain')
>>>
--
nosy: +ramiroluz
___
Python tracker
<http://bugs.python.org/issue5800>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5066] IDLE documentation for Unix obsolete/incorrect
Ramiro Batista da Luz added the comment: I reviewed the texts, applied the patches, ran idle, edited Demo/classes/Dates.py run module inside Idle. Generated the docs inside Doc, with make html and reviewed the IDLE doc in ~/python/py3k/Doc/build/html/library/idle.html?highlight=idle Only in the 3.2 tree. -- nosy: +ramiroluz ___ Python tracker <http://bugs.python.org/issue5066> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10494] Demo/comparisons/regextest.py needs some usage information.
New submission from Ramiro Batista da Luz : When someone run Demo/comparisons/regextest.py without arguments it waits for lines to be inserted in the command line silently, until the EOF, or Ctrl-D in Linux, is entered. If the user read the file, editing or using cat Demo/comparisons/regextest.py he have to understand the code to figure out how to use it. My suggestion is to add an usage message. -- components: Demos and Tools messages: 122032 nosy: ramiroluz priority: normal severity: normal status: open title: Demo/comparisons/regextest.py needs some usage information. type: feature request versions: Python 3.2 ___ Python tracker <http://bugs.python.org/issue10494> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10494] Demo/comparisons/regextest.py needs some usage information.
Ramiro Batista da Luz added the comment: Suggested patch. -- keywords: +patch Added file: http://bugs.python.org/file19759/issue10494_demo_regextest_usage_patch.diff ___ Python tracker <http://bugs.python.org/issue10494> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10495] Demo/comparisons/sortingtest.py needs some usage information.
New submission from Ramiro Batista da Luz : When someone run Demo/comparisons/regextest.py without arguments it waits for lines to be inserted in the command line silently, until the EOF, or Ctrl+D in Linux, is entered. If the user read the file, editing or using cat Demo/comparisons/sortingtest.py he have to understand the code to figure out how to use it. My suggestion is to add an usage message, plus the if __name__ == '__main__':. -- components: Demos and Tools messages: 122048 nosy: ramiroluz priority: normal severity: normal status: open title: Demo/comparisons/sortingtest.py needs some usage information. type: feature request versions: Python 3.2 ___ Python tracker <http://bugs.python.org/issue10495> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10494] Demo/comparisons/regextest.py needs some usage information.
Ramiro Batista da Luz added the comment: New patch from the suggestions, probably it will be discarded (see http://mail.python.org/pipermail/python-ideas/2010-October/008416.html) But the work was already done. :P -- Added file: http://bugs.python.org/file19761/issue10494_demo_regextest_usage_patch_v2.diff ___ Python tracker <http://bugs.python.org/issue10494> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10495] Demo/comparisons/sortingtest.py needs some usage information.
Ramiro Batista da Luz added the comment: I had write a suggested patch before seeing this message http://bugs.python.org/issue10494#msg122047 from Alexander Belopolsky (belopolsky). Probably it will be discarded, but as I commented in the previous #issue10494, the work was already done. (see http://mail.python.org/pipermail/python-ideas/2010-October/008416.html) -- keywords: +patch Added file: http://bugs.python.org/file19762/issue10495_demo_sortingtest_usage_patch.diff ___ Python tracker <http://bugs.python.org/issue10495> ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue5800] make wsgiref.headers.Headers accept empty constructor
Ramiro Batista da Luz added the comment:
I reviewed the patch.
- I applied all the patchs(3 files).
- Ran make and make html in the Doc directory.
- Ran the test_wsgiref.py
- Ran the python interpreter and typed the suggested code:
>>> from wsgiref.headers import Headers
>>> headers = Headers([])
>>> headers.add_header('Content-Type', 'text/plain')
>>> headers = Headers()
>>> headers.add_header('Content-Type', 'text/plain')
>>>
- Read the documentation in a web browser.
All in the revision 86742.
--
___
Python tracker
<http://bugs.python.org/issue5800>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
