-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 >> documentation. > > 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. - -- =================================================================== 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 iD8DBQFJkEhY+gerLs4ltQ4RAqxIAJ9ds65eHMxyMFjltbPrSglCe03KHQCfVSyS UHJV4bm84NLy29xhNJzfz8o= =6Htc -----END PGP SIGNATURE----- _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )