[Zope-dev] __setattr__ and acquisition ( was RE: __getattr__
and acquisition)
Leonardo Rochael Almeida
leo@hiper.com.br
06 Jun 2002 18:09:57 -0300
The only way I know is to put a wrapped object in a ._v_attribute, which
means a volatile attribute.
You can put, for instance, a wrapped self in, for instance
self._v_alterEgo, this way you can do wrapped transversals thru it.
How do you get a wrapped self to put there is an exercise left to the
reader :-) tip: it's no use trying to do it in .__setstate__, as self is
not wrapped there either, last I checked.
On Wed, 2002-06-05 at 16:24, Erik A. Dahl wrote:
> Yep. This is a problem for me I'm trying to find something through
> acquisition in my __setattr__. Self is totally unwrapped. Can anyone
> think of a creative solution? aq_acquire doesn't help because self is
> not a wrapped object. :( Can't pass in the object I want because the
> whole point of the setattr is to get around the function call.
>
--
Ideas don't stay in some minds very long because they don't like
solitary confinement.