':returns: a list of elements forming a path from ``self`` to ``element``
:rtype: list'

def path_to(self, element):

    r = []
    while (element != self):
        r.insert(0, element)
        element = element.parent
    return r
