[Python-Dev] Matching __all__ to doc: bugfix or enhancement?

Terry Reedy tjreedy at udel.edu
Fri Mar 15 02:33:05 CET 2013

The timeit doc describes four public attributes.
The current timeit.__all__ only lists one.
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.

* Typing 'xxx.' and either waiting or typing cntl-space brings up a 
listbox of attributes to select from.

Is the code change an all-version bugfix or a default-only enhancement?
I can see it both ways, but a decision is required to act.

PS: I think the devguide should gain a new 'Behavior versus Enhancement' 
section after the current "11.1.2. Type" to clarify issues like this.

Terry Jan Reedy

More information about the Python-Dev mailing list