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/012987.html below:

[Python-Dev] Re: __all__ for pickle

[Python-Dev] Re: __all__ for pickle [Python-Dev] Re: __all__ for pickleSkip Montanaro skip@mojam.com (Skip Montanaro)
Sat, 17 Feb 2001 09:29:34 -0600 (CST)
    Tim> I'm still not sure I've got any use for __all__, though <wink>.

That may be true.  I think the canonical case that is being defended against
is a module-level symbol in one module obscuring a builtin, e.g.:

    # a.py

    def list(s):
	return s

    # b.py

    from a import *
    ...
    l = list(('a','b','c'))

I suspect in the long-run there's a better way to accomplish this than
adding __all__ to most Python modules, perhaps pylint.

Which reminds me... I did write something once upon a time to catch symbols
that hide builtins, only at more than the module level:

    http://musi-cal.mojam.com/~skip/python/hiding.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