[Python-Dev] Keeping __init__.py empty for Python packages used for module grouping.
tseaver at palladion.com
Mon Jan 24 22:59:12 CET 2011
-----BEGIN PGP SIGNED MESSAGE-----
On 01/24/2011 03:14 PM, Fred Drake wrote:
> On Mon, Jan 24, 2011 at 2:04 PM, Raymond Hettinger
> <raymond.hettinger at gmail.com> wrote:
>> ISTM, that if we're going to use python packages as "namespace containers" for
>> categorizing modules, then the top level __init__ namespace should be left empty.
> This is only an issue if the separate components are distributed
> separately; for the standard library, we're not using it as a
> namespace package in the same sense that is done with (for example)
> the "zope" package.
It might matter if we want to enable third-party package installation
into a namespace also used by the stdlib: ISTR that the 'xml' package
had such installs at one point.
If that pattern is a goal, having all versions of the namespace's
__init__.py empty of anything but the __path__-munging majyk /
boilerplate is required to make such installs work regardless of the
order of PYTHONPATH.
Tres Seaver +1 540-429-0999 tseaver at palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----END PGP SIGNATURE-----
More information about the Python-Dev