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

[Python-Dev] Add __exports__ to modules

[Python-Dev] Add __exports__ to modulesThomas Wouters thomas@xs4all.net
Thu, 11 Jan 2001 16:48:32 +0100
On Thu, Jan 11, 2001 at 04:33:28PM +0100, M.-A. Lemburg wrote:

> > Please don't use __all__.  At the moment, __all__ is the only way
> > to easily tell whether a particular module object really represents
> > a package, and the only way to get the list of submodule names.
> 
> But __all__ has to be user-defined, so I don't buy that argument.
> Note that the only true way to recognize a package is by looking
> for an attribute "__path__" since Python adds this for packages
> only.

Ehm.... What, exactly, prevents usercode from doing

__path__ = "neener, neener"

? In other words, even *that* isn't a true way to recognize a package. You
can see what isn't a package, but not what is.

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!



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