bpo-29662: fix wrong indentation in timeit.Timer's doc (GH-333) · python/cpython@8aa1ad8 (original) (raw)
`@@ -134,21 +134,21 @@ The module defines three convenience functions and a public class:
`
134
134
` timeit.Timer('for i in range(10): oct(i)', 'gc.enable()').timeit()
`
135
135
``
136
136
``
137
``
`-
.. method:: Timer.autorange(callback=None)
`
``
137
`+
.. method:: Timer.autorange(callback=None)
`
138
138
``
139
``
`` -
Automatically determine how many times to call :meth:.timeit
.
``
``
139
`` +
Automatically determine how many times to call :meth:.timeit
.
``
140
140
``
141
``
`` -
This is a convenience function that calls :meth:.timeit
repeatedly
``
142
``
`-
so that the total time >= 0.2 second, returning the eventual
`
143
``
`-
(number of loops, time taken for that number of loops). It calls
`
144
``
`` -
:meth:.timeit
with number set to successive powers of ten (10,
``
145
``
`-
100, 1000, ...) up to a maximum of one billion, until the time taken
`
146
``
`-
is at least 0.2 second, or the maximum is reached.
`
``
141
`` +
This is a convenience function that calls :meth:.timeit
repeatedly
``
``
142
`+
so that the total time >= 0.2 second, returning the eventual
`
``
143
`+
(number of loops, time taken for that number of loops). It calls
`
``
144
`` +
:meth:.timeit
with number set to successive powers of ten (10,
``
``
145
`+
100, 1000, ...) up to a maximum of one billion, until the time taken
`
``
146
`+
is at least 0.2 second, or the maximum is reached.
`
147
147
``
148
``
If *callback* is given and is not ``None``, it will be called after
149
``
each trial with two arguments: ``callback(number, time_taken)``.
``
148
If *callback* is given and is not ``None``, it will be called after
``
149
each trial with two arguments: ``callback(number, time_taken)``.
150
150
``
151
``
`-
.. versionadded:: 3.6
`
``
151
`+
.. versionadded:: 3.6
`
152
152
``
153
153
``
154
154
` .. method:: Timer.repeat(repeat=3, number=1000000)
`