'return the common part shared with the other path
or None if there is no common part.'

def common(self, other):

    last = None
    for (x, y) in zip(self.parts(), other.parts()):
        if (x != y):
            return last
        last = x
    return last
