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

2006-06-08 Thread Dieter Maurer
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
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


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

2006-06-08 Thread Doyon, Jean-Francois
I was afraid of this ... :(

Back to using get_request() then!

J.F. 

-Original Message-
From: Dieter Maurer [mailto:[EMAIL PROTECTED] 
Sent: June 8, 2006 12:50 PM
To: Doyon, Jean-Francois
Cc: 'zope@zope.org'
Subject: Re: [Zope] REQUEST within a property() getter/setter

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
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


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

2006-06-07 Thread Doyon, Jean-Francois
Hello,

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?

Jean-François Doyon
Internet Service Development and Systems Support / Spécialiste de
dèveloppements internet et soutien technique
Canada Centre for Remote Sensing/Centre Canadien de télédétection
Natural Resources Canada/Ressources Naturelles Canada
http://atlas.gc.ca
Tel./Tél.: (613) 992-4902
Fax: (613) 947-2410
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )