[Zope-dev] recursing in children

Florent Guillaume fg@nuxeo.com
15 Aug 2001 10:56:24 GMT


What is the Right Way to recurse in children ?
Should I use objectItems or objectValues ?

I planned on using:
	if hasattr(aq_base(obj), 'objectValues'):
	  subobjs = obj.objectValues()
            if subobjs:
                for s in subobjs:
                   # ...

But I noticed that most Zope code uses objectItems for such recursions,
even though the id is sometimes not used. And that CMFCore.PortalContent
only defines objectItems for its talkback, not objectValues. Hmm...

Thanks,

Florent Guillaume
Nuxeo