[Zope] Zope Components
Phillip J. Eby
pje@telecommunity.com
Tue, 26 Oct 1999 07:05:32 -0500
At 07:42 AM 10/26/99 +0000, Oleg Broytmann wrote:
> But what about Aquisition? I saw some docs on Aquisition on Zope site,
>but cannot figure out how to use Aquisition with Python. Any help, any tip,
>any example?
Acquisition is part of the ExtensionClass package, so that's what you need
to install.
To use it, in the simplest way, make all your objects' classes inherit from
Acquisition.Implicit. Then, whenever you retrieve one object from another,
it will acquire attributes from the object it was retrieved from.
To loosen the rules slightly, the object you want to have acquire
attributes from its parent is the only thing which needs to subclass from
Acquisition.Implicit. The parent can inherit from ExtensionClass.Base, if
the parent does not itself need to acquire things from its parent.