[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/publisher/browser/configure.zcml Allowed annotations on the BrowserRequest

Dmitry Vasiliev lists at hlabs.spb.ru
Thu Nov 3 09:24:43 EST 2005


Benji York wrote:
> Stephan Richter wrote:
> 
>> On Thursday 03 November 2005 08:06, Dmitry Vasiliev wrote:
>>
>>> Log message for revision 39866:
>>>  Allowed annotations on the BrowserRequest
>>
>>
>> Why do we want to allow the request to be annotated? The request is 
>> thrown away after each request ;-), so that annotations don't make any 
>> sense.
> 
> 
> It does make sense if you want things to be "persistent" across a single 
> request and also be request-local (like thread-local).  We've used 
> something similar to cache expensive calculations during the processing 
> of a request and to transfer information between objects that otherwise 
> wouldn't be able to communicate.
> 
> I would prefer we remove the underscores from the attribute name though.

With '__annotations__' you can just use standard IAnnotations adapter.

-- 
Dmitry Vasiliev (dima at hlabs.spb.ru)
     http://hlabs.spb.ru


More information about the Zope3-Checkins mailing list