diff options
author | Xiang Zhang <angwerzx@126.com> | 2017-02-27 05:42:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 05:42:01 (GMT) |
commit | 210d6a9f951b621b095bc5b72821cf60198ffea8 (patch) | |
tree | 87c45f7638ebe4eb92b27c28fee13b01efb17ca4 /Doc | |
parent | f3a9faba4bad91286b78b498547de928078f55da (diff) | |
download | cpython-210d6a9f951b621b095bc5b72821cf60198ffea8.zip cpython-210d6a9f951b621b095bc5b72821cf60198ffea8.tar.gz cpython-210d6a9f951b621b095bc5b72821cf60198ffea8.tar.bz2 |
bpo-29662: fix wrong indentation in timeit.Timer's doc (GH-332)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/timeit.rst | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst index 4065808..8bbadf1 100644 --- a/Doc/library/timeit.rst +++ b/Doc/library/timeit.rst @@ -134,20 +134,20 @@ The module defines three convenience functions and a public class: timeit.Timer('for i in range(10): oct(i)', 'gc.enable()').timeit() - .. method:: Timer.autorange(callback=None) + .. method:: Timer.autorange(callback=None) - Automatically determine how many times to call :meth:`.timeit`. + Automatically determine how many times to call :meth:`.timeit`. - This is a convenience function that calls :meth:`.timeit` repeatedly - so that the total time >= 0.2 second, returning the eventual - (number of loops, time taken for that number of loops). It calls - :meth:`.timeit` with increasing numbers from the sequence 1, 2, 5, - 10, 20, 50, ... until the time taken is at least 0.2 second. + This is a convenience function that calls :meth:`.timeit` repeatedly + so that the total time >= 0.2 second, returning the eventual + (number of loops, time taken for that number of loops). It calls + :meth:`.timeit` with increasing numbers from the sequence 1, 2, 5, + 10, 20, 50, ... until the time taken is at least 0.2 second. - If *callback* is given and is not ``None``, it will be called after - each trial with two arguments: ``callback(number, time_taken)``. + If *callback* is given and is not ``None``, it will be called after + each trial with two arguments: ``callback(number, time_taken)``. - .. versionadded:: 3.6 + .. versionadded:: 3.6 .. method:: Timer.repeat(repeat=3, number=1000000) |