A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-February/012931.html below:

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib sre_constants.py (etc)

[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib sre_constants.py (etc) [Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Lib sre_constants.py (etc)Skip Montanaro skip@mojam.com (Skip Montanaro)
Thu, 15 Feb 2001 17:13:09 -0600 (CST)
    Fredrik> can anyone explain why it's a good idea to have totally
    Fredrik> incomprehensible stuff like

    Fredrik>     __all__ = locals().keys()
    Fredrik>     for _i in range(len(__all__)-1,-1,-1):
    Fredrik>         if __all__[_i][0] == "_":
    Fredrik>             del __all__[_i]
    Fredrik>     del _i

    Fredrik> in my code?

Please don't shoot the messenger... ;-)

In modules that looked to me to contain nothing by constants, I used the
above technique to simply load all the modules symbols into __all__, then
delete any that began with an underscore.  If there is no reason to have an
__all__ list for such modules, feel free to remove the code, just remember
to also delete the check_all() call in Lib/test/test___all__.py.

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