I wasn't reading the code clearly the first time around. By far the simplest place to return copied results from methodB is to change the last line to return objects[:] Erik Enge wrote:
def methodB(self, object, skip=[], stop=[], objects=[]): "doc string" try: if object.meta_type in skip: return self.methodB(object.getParentNode(), skip, stop, objects)
if object.meta_type in stop: raise AttributeError else: # I don't think I need this. if object not in objects: objects.append(object) else: raise AttributeError
return self.methodB(object.getParentNode(), skip, stop, objects) except AttributeError: return objects
-- Steve Alexander Software Engineer Cat-Box limited