[Python-checkins] cpython (merge 3.4 -> default): Merge from 3.4

andrew.kuchling python-checkins at python.org
Mon Apr 14 19:52:54 CEST 2014


http://hg.python.org/cpython/rev/39f60aa96475
changeset:   90276:39f60aa96475
parent:      90274:99db0ca554d9
parent:      90275:7e2708484ea5
user:        Andrew Kuchling <amk at amk.ca>
date:        Mon Apr 14 13:52:34 2014 -0400
summary:
  Merge from 3.4

files:
  Doc/library/timeit.rst |  6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)


diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst
--- a/Doc/library/timeit.rst
+++ b/Doc/library/timeit.rst
@@ -63,6 +63,12 @@
    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)
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list