[Python-Dev] Breaking undocumented API

Michael Foord fuzzyman at voidspace.org.uk
Thu Nov 18 11:47:18 CET 2010


On 17/11/2010 21:16, Éric Araujo wrote:
>> 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__.
>

"import *" would then override the builtin open. A good reason not to 
use "import *" I guess, but also a good reason not to create names that 
shadow builtins.

All the best,

Michael

> Regards
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk


-- 

http://www.voidspace.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 mailing list