[issue15183] it should be made clear that the statement in the --setup option and the setup kw arg aren't included in the count
New submission from Tshepang Lekhonkhobe <tshepang@gmail.com>: I looked at 'python -m time -h' and the timeit doc, and it was not clear to me (after a quick read) that the statement(s) inside --setup option and setup keyword argument weren't included in the speed test. I had to check for myself by writing code. ---------- assignee: docs@python components: Documentation messages: 163999 nosy: docs@python, tshepang priority: normal severity: normal status: open title: it should be made clear that the statement in the --setup option and the setup kw arg aren't included in the count versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15183> _______________________________________
Tshepang Lekhonkhobe <tshepang@gmail.com> added the comment: sorry, I meant 'python -m timeit -h' ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15183> _______________________________________
Greg Roodt <groodt@gmail.com> added the comment: Confirmed that the setup statement is correctly excluded from the overall timed run. I've updated the docstring and rst to make this clearer. ---------- keywords: +patch nosy: +groodt Added file: http://bugs.python.org/file26288/timeit_setup_clarification.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15183> _______________________________________
Roundup Robot added the comment: New changeset e0e3d2ec56b6 by Andrew Kuchling in branch '3.4': #15183: clarify timeit documentation to say that setup statement isn't timed https://hg.python.org/cpython/rev/e0e3d2ec56b6 ---------- nosy: +python-dev _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15183> _______________________________________
A.M. Kuchling added the comment: Committed to 3.4 and default. Thanks for your patch! ---------- nosy: +akuchling resolution: -> fixed stage: -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue15183> _______________________________________
participants (4)
-
A.M. Kuchling
-
Greg Roodt
-
Roundup Robot
-
Tshepang Lekhonkhobe