[Zope-dev] Coding style clarifications
Martijn Faassen
faassen at startifact.com
Fri Feb 20 10:15:09 EST 2009
Jim Fulton wrote:
> BTW, I strongly discourage from imports. (I didn't always have this
> opinion, but have seen the error of my ways. Thanks to Fred Drake for
> nudging me in this direction.) IMO, this is wildly more important than
> any of the issues raised in this thread.
I like from imports as they allow me to provide a public API in the
__init__.py of a package (instead of scattering it all over the place in
sub-modules of the package nobody should need to know about). Absolute
imports tend to break this ability in subtle ways.
I suspect there are two possibilities:
* no API defined in __init__.py and absolute imports
* API defined in __init__.py and dotted.package.name.references don't work.
This looks like a religious debate though.
Regards,
Martijn
More information about the Zope-Dev
mailing list