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

[Python-Dev] Add __exports__ to modules

[Python-Dev] Add __exports__ to modules [Python-Dev] Add __exports__ to modulesGuido van Rossum guido@python.org
Thu, 11 Jan 2001 10:58:55 -0500
> 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.
> 
> If __all__ is overloaded to also represent exportable symbols in
> modules, these two pieces of information will be impossible (or
> require much ugly hackery) to obtain.

Marc-Andre already explained that __all__ is not to be trusted.

If you want a reasonably good test for package-ness, use the presence
of __path__.

For a really good test, check whether __file__ ends in __init__.py[c].

--Guido van Rossum (home page: http://www.python.org/~guido/)



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