[Zope-dev] multiple packages in the same namespace

Dieter Maurer dieter at handshake.de
Sun Feb 8 03:01:54 EST 2009


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
>documentation.

However, extreme care must be taken to avoid name clashes.

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.



-- 
Dieter


More information about the Zope-Dev mailing list