-----BEGIN PGP SIGNED MESSAGE-----
Dieter Maurer wrote:
> Christian Theune wrote at 2009-2-7 09:36 +0100:
>> According to the setuptools documentation and our experiments on the
>> sprint, this is supposed to work and does work:
>> "When you declare a package to be a namespace package, it means that the
>> package has no meaningful contents in its __init__.py, and that it is
>> merely a container for modules and subpackages."
>>>> If so, which packagea/__init__.py gets used?
>> Only the __init__.py isn't allowed to have code is what I read from the
> However, extreme care must be taken to avoid name clashes.
As with any namespace, sure. But there would be no point in namespace
packages at all if modules or subpackages couldn't be placed in them.
> For Modules/packages with the same name it is not deterministic
> which of them will actually be loaded. "__init__.py" is just
> a common case of this problem.
It is the one which is guaranteed to clash, since its absence makes a
directory not-a-package at all. Setuptools documents that every
directory participating in a namespace package must have the "declare a
namespace" boilerplate in its __init__.py, and *nothing else*.
Tres Seaver +1 540-429-0999 tsea...@palladion.com
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
Zope-Dev maillist - Zope-Dev@zope.org
** No cross posts or HTML encoding! **
(Related lists -