Title: it should be made clear that the statement in the --setup option and the setup kw arg aren't included in the count
Type: Stage: resolved
Components: Documentation Versions: Python 3.2, Python 3.3, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: akuchling, docs@python, groodt, python-dev, tshepang
Priority: normal Keywords: patch

Created on 2012-06-25 18:01 by tshepang, last changed 2015-04-21 23:47 by akuchling. This issue is now closed.

File name Uploaded Description Edit
timeit_setup_clarification.diff groodt, 2012-07-07 10:51 review
Messages (5)
msg163999 - (view) Author: Tshepang Lekhonkhobe (tshepang) * Date: 2012-06-25 18:01
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.
msg164000 - (view) Author: Tshepang Lekhonkhobe (tshepang) * Date: 2012-06-25 18:02
sorry, I meant 'python -m timeit -h'
msg164819 - (view) Author: Greg Roodt (groodt) * Date: 2012-07-07 10:51
Confirmed that the setup statement is correctly excluded from the overall timed run.

I've updated the docstring and rst to make this clearer.
msg241755 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2015-04-21 23:47
New changeset e0e3d2ec56b6 by Andrew Kuchling in branch '3.4':
#15183: clarify timeit documentation to say that setup statement isn't timed
msg241756 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2015-04-21 23:47
Committed to 3.4 and default.  Thanks for your patch!
Date User Action Args
2015-04-21 23:47:42akuchlingsetstatus: open -> closed

nosy: + akuchling
messages: + msg241756

resolution: fixed
stage: resolved
2015-04-21 23:47:02python-devsetnosy: + python-dev
messages: + msg241755
2012-07-07 10:51:38groodtsetfiles: + timeit_setup_clarification.diff

nosy: + groodt
messages: + msg164819

keywords: + patch
2012-06-25 18:02:47tshepangsetmessages: + msg164000
2012-06-25 18:01:59tshepangcreate