[Zope-dev] zpatterns-0.4a4

2000-06-26 Thread Jephte CLAIN
There is a bug (a feature?) in Specialist.getItem in zpatterns-0.4a4: def getItem(self, key): if hasattr(self.aq_base,'retrieveItem'): return self.retrieveItem(key=key) # XXX need DTML check? for rack in self.rackList: item = rack.__of__(self).getItem(key) return

Re: [Zope-dev] zpatterns-0.4a4

2000-06-26 Thread mike
Jephte CLAIN wrote: There is a bug (a feature?) in Specialist.getItem in zpatterns-0.4a4: def getItem(self, key): if hasattr(self.aq_base,'retrieveItem'): return self.retrieveItem(key=key) # XXX need DTML check? for rack in self.rackList: item =

Re: [Zope-dev] zpatterns-0.4a4

2000-06-26 Thread Jephte CLAIN
mike wrote: I also think so, Jephte. But I thought 'for rack ...' was just a shorter form of if len( rackList) 0) : return rackList[0].__of__( self).getItem( key) else : return None The intended behavior (at least in zpatterns-0.3) was to get an item from one of the racks. This is

Re: [Zope-dev] zpatterns-0.4a4

2000-06-26 Thread Phillip J. Eby
At 01:08 PM 6/26/00 +0400, Jephte CLAIN wrote: This code should (IMHO) read: def getItem(self, key): if hasattr(self.aq_base,'retrieveItem'): return self.retrieveItem(key=key) # XXX need DTML check? for rack in self.rackList: item = rack.__of__(self).getItem(key)