PEP 328 update
Dieter Maurer
dieter at handshake.de
Tue May 4 15:31:49 EDT 2004
Aahz <aahz at pythoncraft.com> writes on Sun, 2 May 2004 15:20:32 -0400:
> One area where feedback is
> particularly desired is on the frequency of relative imports inside
> packages in current code, both in absolute terms and as a percentage of
> all imports.
All my local module/subpackage references inside a package use relative
imports. I never followed the style guide with respect to
absolute import paths because this had made my packages less
relocatable.
Zope makes essential use of local imports for its
"Products" magic:
It supports several (configurable) locations where
extensions products can come from.
Any such product should be importable through
"from Products import product".
It achieves this by extending its main "Products" "__path__"
attribute with the additional locations.
This might be unaffected by PEP 328.
Dieter
More information about the Python-list
mailing list