'The tree position of this tree, relative to the root of the
tree.  I.e., ``ptree.root[ptree.treeposition] is ptree``.'

def treeposition(self):

    if (self.parent() is None):
        return ()
    else:
        return (self.parent().treeposition() + (self.parent_index(),))
