[Zope] small problem in external methods

Martin Dougiamas martin@dougiamas.com
Wed, 26 May 1999 10:39:15 +0800


Michel Pelletier wrote:
> > def example(self):
> >     foldername = 'fred'
> >     if foldername in self.objectIds():
> >         return getattr(self, foldername).title
> 
> I believe 'return self[foldername].title' will also work.  Folder
> objects support __getitem__.

Unfortunately that isn't working.

> BTW, this is a good question for zope-dev.
> 
> -Michel the overly subtle

Glad you raised that - to me external methods fit in the charter
of both lists.  ie discussion of the operation of Zope blends
with discussion about the internal mechanisms of Zope.

But I agree - perhaps we should try and keep anything with sample
code on zope-dev, especially with the rise in non-coding traffic
on the main list.

Cheers,
Martin