[Zope3-dev] Packaging conventions (was Re: PyCon DC 2003: Call For Papers)
Jim Fulton
jim@zope.com
Fri, 13 Dec 2002 16:28:15 -0500
Phillip J. Eby wrote:
>
...
> from peak.naming import api as naming
And this is good ... why?
> naming.lookup('something')
Is lookup part of the convention or simply an example function?
> That is, for "shortcut" access to commonly used features of the package,
> those intended to be used by an app developer as opposed to a framework
> extender. In PEAK, usually the "api" package consists of a series of
> "from foo import *" statements importing all the exported capabilities
> of various nearby modules that expose API-ish things, and always
> including the "interfaces" module, so that a package's interfaces are
> always available via the "api" shortcut.
What is the advantage of api over __init__?
Jim
--
Jim Fulton mailto:jim@zope.com Python Powered!
CTO (888) 344-4332 http://www.python.org
Zope Corporation http://www.zope.com http://www.zope.org