From: "Vlad Dumitrescu" <Vlad.Dumitrescu@REDACTED> > What I want is operations like insert_sibling_before, insert_sibling_after, > insert_child_first, insert_child_last. Also it should be possible to move > around entire subtrees. Perhaps this is overkill, and not exactly what you want, but have you considered the digraph module from stdlib? Cheers P.