28 Mar
2000
28 Mar
'00
12:28 p.m.
I want to make an external method which does the following : iterates over all the parents, if a parent is of a certain type, the title must be added to a list. However I don't know how to iterate over an object (ZClass) it's parents in Python/Zope. Can anybody help? def GetParentNames(self): obj=self result=[] while obj.parent<>nil: <-- this is wrong obj=obj.parent <-- this is wrong if obj.meta_type=='KBItem': result.append(obj.Title) return result Thanks in advance, Tom.