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

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Nov 3 11:16:57 EST 2005


On Thursday 03 November 2005 10:49, Gary Poster wrote:
> On Nov 3, 2005, at 10:44 AM, Stephan Richter wrote:
> > Since "annotations" is already there in 3.1, it will be easier to  
> > adjust the
> > new code to this attribute instead of deprecating annotations and  
> > introducing
> > __annotations__, unless Dimitry is willing to do that. :-) I agree  
> > with
> > Dimitry that using __annotations__ makes more sense, since this is  
> > what we
> > use anywhere else.
>
> The '__annotations__' name is an implementation detail of the  
> attribute annotations package, has nothing to do with IAnnotatable or  
> IAnnotations, and was designed for objects that do not have  
> annotations as part of their core contract.  If something has  
> annotations as part of their core contract, such as the request  
> object, I see no reason to resort to "underwear".  Moreover, this  
> part of the request contract already exists in 3.1, and we rely on  
> it.  I'm -1 on converting to '__annotations__' for the request.

This is a half-truth. It is right that __annotations__ is an implementation 
detail. However, if you want to use the AttributeAnnotations adapter, then 
you have to allow for __annotations__. If you use "annotations", you have to 
write a custom adapter, which seems unnecessary.

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-Checkins mailing list