Em Sex, 2006-11-17 às 07:48 +0000, Chris Withers escreveu:
> Leonardo Rochael Almeida wrote:
> [....]
> 
> > This is the full method before my changes:
> > 
> >     def getobject(self, rid, REQUEST=None):
> >         """Return a cataloged object given a 'data_record_id_'
> >         """
> >         obj = self.aq_parent.unrestrictedTraverse(self.getpath(rid))
> >         if not obj:
> >             if REQUEST is None:
> >                 REQUEST=self.REQUEST
> >             obj = self.resolve_url(self.getpath(rid), REQUEST)
> >         return obj
> 
> [...]
> 
> > A) Keep my changes, but use a marker "object()" instead of None for the
> > "default" parameter of the .unrestrictedTraverse() call.
> > 
> > B) Reverse my changes, but also remove the "if not obj" block, which is
> > buggy whichever way you look at it with the old unrestrictedTraverse
> > call.
> > 
> > Which one should it be?
> 
> I'd go for B.

If no one else chimes in today, I'll implement B.
ZCatalog .getobject(rid) call will simply call unrestrictedTraverse,
ignoring the REQUEST. parameter. I'll add a deprecation warning on the
trunk if the REQUEST parameter is passed in.

Cheers, Leo

-- 
Leonardo Rochael Almeida
Enfold Systems
http://www.enfoldsystems.com
phone. +1.713.942.2377 Ext 215
fax. +1.832.201.8856

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to