diff options
author | Xiang Zhang <angwerzx@126.com> | 2017-02-27 05:55:07 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-27 05:55:07 (GMT) |
commit | 8aa1ad892ff3cf4d8881cdae0e95be1a5bad175e (patch) | |
tree | 09f3ca084be98d661ea68d1c6afbe12065a38642 /Doc/library | |
parent | 4b6c41768a15fc85e3069603ef89344bd97f79af (diff) | |
download | cpython-8aa1ad892ff3cf4d8881cdae0e95be1a5bad175e.zip cpython-8aa1ad892ff3cf4d8881cdae0e95be1a5bad175e.tar.gz cpython-8aa1ad892ff3cf4d8881cdae0e95be1a5bad175e.tar.bz2 |
bpo-29662: fix wrong indentation in timeit.Timer's doc (GH-333)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/timeit.rst | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/Doc/library/timeit.rst b/Doc/library/timeit.rst index 3b77276..5793c54 100644 --- a/Doc/library/timeit.rst +++ b/Doc/library/timeit.rst @@ -134,21 +134,21 @@ 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 *number* set to successive powers of ten (10, - 100, 1000, ...) up to a maximum of one billion, until the time taken - is at least 0.2 second, or the maximum is reached. + 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 *number* set to successive powers of ten (10, + 100, 1000, ...) up to a maximum of one billion, until the time taken + is at least 0.2 second, or the maximum is reached. - 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) |