diff options
author | Andrew Kuchling <amk@amk.ca> | 2015-04-21 23:43:33 (GMT) |
---|---|---|
committer | Andrew Kuchling <amk@amk.ca> | 2015-04-21 23:43:33 (GMT) |
commit | 333518e01df0ce011962ca8629e766a59316e1cb (patch) | |
tree | a70ad45819e811c872b5db7eab6649cd6e4806f6 /Doc/library | |
parent | b6076fb13c6bf97f4fae76da478a26e0f4f24879 (diff) | |
download | cpython-333518e01df0ce011962ca8629e766a59316e1cb.zip cpython-333518e01df0ce011962ca8629e766a59316e1cb.tar.gz cpython-333518e01df0ce011962ca8629e766a59316e1cb.tar.bz2 |
#15183: clarify timeit documentation to say that setup statement isn't timed
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/timeit.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst index 503a705..70df409 100644 --- a/Doc/library/timeit.rst +++ b/Doc/library/timeit.rst @@ -94,6 +94,8 @@ The module defines three convenience functions and a public class: method. The :meth:`.repeat` method is a convenience to call :meth:`.timeit` multiple times and return a list of results. + The execution time of *setup* is excluded from the overall timed execution run. + The *stmt* and *setup* parameters can also take objects that are callable without arguments. This will embed calls to them in a timer function that will then be executed by :meth:`.timeit`. Note that the timing overhead is a |