[Python-Dev] Breaking undocumented API
fuzzyman at voidspace.org.uk
Thu Nov 18 11:54:23 CET 2010
On 17/11/2010 21:22, Georg Brandl wrote:
> Am 17.11.2010 22:16, schrieb Éric Araujo:
>>> Excluding a builtin name from __all__ sounds like a perfectly sensible
>>> idea, so even if it wasn't deliberate, I'd say it qualifies as
>>> fortuitous :)
>> But then, a tool that looks into __all__ to find for example what
>> objects to document will miss open. I’d put open in __all__.
> So it comes down again to what we'd like __all__ to mean foremost:
> public API, or just a list for "import *"?
Well, as noted earlier in this discussion - the language reference
*states* that __all__ defines the module level public API.
"If the list of identifiers is replaced by a star ('*'), all public
names defined in the module are bound in the local namespace of the
"The public names defined by a module are determined by checking
the module’s namespace for a variable named __all__"
If we decide that __all__ is purely for "import *" we should refine the
use of the word public on this page.
All the best,
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.
More information about the Python-Dev