original) (raw)
(On Thu, Mar 14, 2013 at 6:33 PM, Terry Reedy <tjreedy@udel.edu> wrote:
The timeit doc describes four public attributes.
The current timeit.\_\_all\_\_ only lists one.
http://bugs.python.org/issue17414
proposes to expand \_\_all\_\_ to include all four:
\-\_\_all\_\_ = \["Timer"\]
+\_\_all\_\_ = \["Timer", "timeit", "repeat", "default\_timer"\]
The effect of the change is
a) help(timit) will mention the three functions as well as the class;
b) IDLE's attribute completion box\* will list all four instead just Timer;
c) unknow other users of .\_\_all\_\_ will see the expanded list, for better or worse.
Another effect is that existing code that does:
from timeit import \*
May break. The above may not be the recommended best practice in Python, but it's perfectly valid and widely used.
Eli