[New-bugs-announce] [issue29661] Typo in the docstring of timeit.Timer.autorange

Antony Lee report at bugs.python.org
Sun Feb 26 23:02:11 EST 2017


New submission from Antony Lee:

The docstring of timeit.Timer.autorange currently reads

     |      Return the number of loops so that total time >= 0.2.
     |      
     |      Calls the timeit method 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.
     |      Returns ``(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)``.

Note the contradiction between the return values documented in the first and second paragraphs (the second one is correct).

----------
components: Library (Lib)
messages: 288619
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Typo in the docstring of timeit.Timer.autorange
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29661>
_______________________________________


More information about the New-bugs-announce mailing list