[Zope] REQUEST within a property() getter/setter

Dieter Maurer dieter at handshake.de
Thu Jun 8 12:50:17 EDT 2006


Doyon, Jean-Francois wrote at 2006-6-7 17:13 -0400:
>When executing code within a property getter/setter, I can't seem to get to
>the REQUEST object.
>
>self.REQUEST always seems to return <Special Object Used to Force
>Acquisition> ...
>
>Anyway around this?

No.

Python's low level attribute access methods ("__getattribute__", "__getattr__",
"__setattr__", property setter/getter) are below the reach of acquisition.
Their "self" is not acquisition wrapped.

That's why your "self.REQUEST" is "Acquisition.Acquired"
(rather then the acquire object).



-- 
Dieter


More information about the Zope mailing list