A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-November/105708.html below:

[Python-Dev] Breaking undocumented API

[Python-Dev] Breaking undocumented API [Python-Dev] Breaking undocumented APIGeorg Brandl g.brandl at gmx.net
Thu Nov 18 13:37:38 CET 2010
Am 18.11.2010 11:47, schrieb Michael Foord:
> 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.

Heh.  Instead have fun with io.ioopen(), gzip.gzipopen(),
webbrowser.webbrowseropen(), etc.?  We do have namespace support for a reason.

Georg

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4