[Zope] FW: Explicit Acquisition within Acquistion.Implicit derived class

Dieter Maurer dieter at handshake.de
Wed May 26 17:36:13 EDT 2004


Wyatt Anderson wrote at 2004-5-25 12:42 -0400:
>Anyone familiar with Acquisition specifics in an Acquisition.Implicit
>Object?  I want to be able to dynamically set an attribute (it does
>Start with an '_' (underscore)) to a value or to explicity say to
>acquire it from its ancestors.

On what object you want to set the attribute?
When you want to set it on the base object ("wrapper.aq_base"),
then just use "wrapper.<attribute> = value".
The assignment effectively happens to "wrapper.aq_base.<attribute>".

You can only assign attributes to base objects.
Wrappers themselfs do not have a "__dict__" and all other
attributes are read only.

-- 
Dieter



More information about the Zope mailing list