Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Doc/library/timeit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,12 @@ The module defines three convenience functions and a public class:

.. method:: Timer.autorange(callback=None)

Automatically determine how many times to call :meth:`.timeit`.
Call :meth:`.timeit` automatically determined number of times.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Call :meth:`.timeit` automatically determined number of times.
Call :meth:`.timeit` an automatically determined number of times.


This is a convenience function that calls :meth:`.timeit` repeatedly
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is a convenience function that calls :meth:`.timeit` repeatedly
This is a convenience function that repeatedly calls :meth:`.timeit`

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 seconds.
with increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
with increasing numbers from the sequence 1, 2, 5, 10, 20, 50, ...
with an increasing amount of iterations from the sequence 1, 2, 5, 10, 20, 50, ...

until the time taken is at least 0.2 seconds, returning the eventual
(number of loops, time taken for that number of loops).

If *callback* is given and is not ``None``, it will be called after
each trial with two arguments: ``callback(number, time_taken)``.
Expand Down
Loading