diff options
author | Andrew Kuchling <amk@amk.ca> | 2014-04-14 17:52:34 (GMT) |
---|---|---|
committer | Andrew Kuchling <amk@amk.ca> | 2014-04-14 17:52:34 (GMT) |
commit | 7f54b2bf710a2d7653090b54f50c2874104653dc (patch) | |
tree | 9d1623a4655d281803e7f22bfb8d975cdb3f01bf | |
parent | c7fee85319cff60a1cbf0371b23c24915f4b1279 (diff) | |
parent | 44da19a63d332a11df16475744355e091c89f3b8 (diff) | |
download | cpython-7f54b2bf710a2d7653090b54f50c2874104653dc.zip cpython-7f54b2bf710a2d7653090b54f50c2874104653dc.tar.gz cpython-7f54b2bf710a2d7653090b54f50c2874104653dc.tar.bz2 |
Merge from 3.4
-rw-r--r-- | Doc/library/timeit.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst index 0cc1586..824a8a3 100644 --- a/Doc/library/timeit.rst +++ b/Doc/library/timeit.rst @@ -63,6 +63,12 @@ The module defines three convenience functions and a public class: Create a :class:`Timer` instance with the given statement, *setup* code and *timer* function and run its :meth:`.timeit` method with *number* executions. + .. note:: + + Because :meth:`.timeit` is executing *stmt*, placing a return statement + in *stmt* will prevent :meth:`.timeit` from returning execution time. + It will instead return the data specified by your return statement. + .. function:: repeat(stmt='pass', setup='pass', timer=<default timer>, repeat=3, number=1000000) |