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/2001-February/012488.html below:

[Python-Dev] creating __all__ in extension modules

[Python-Dev] creating __all__ in extension modules [Python-Dev] creating __all__ in extension modulesSkip Montanaro skip@mojam.com (Skip Montanaro)
Fri, 2 Feb 2001 11:24:30 -0600 (CST)
    Fredrik> what's the point?  doesn't from-import already do exactly that
    Fredrik> on C extensions?

Consider os.  At one point it does "from posix import *".  Okay, which
symbols now in its local namespace came from posix and which from its own
devices?  It's a lot easier to do

    from posix import __all__ as _all
    __all__.extend(_all)
    del _all

than to muck about importing posix, looping over its dict, then
incorporating what it finds.

It also makes things a bit more consistent for introspective tools.

Skip





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