Fredrik Lundh fredrik@pythonware.com
Wed, 9 Sep 1998 17:34:46 +0100

> That seems like a reasonable strategy, but how do you
>determine what the parent reference should be, in general?  It's
>obviously trivial to construct a proxy for some special cases, such as 
>the children of a node, but how would you find the parent of a node
>without actually storing a reference to it?  Storing a non-reference,
>such as an integer ID?  Walking the tree?  Something else?

The iterator uses a a parent list which is updated when you
move around in the tree.  If you go down, it adds the current
node to the parent list.  If you go up, it removes a node.

Cheers /F