'Change location of an existing item.'

def link(self, key, location):

    n = self.keyOrder.index(key)
    del self.keyOrder[n]
    i = self.index_for_location(location)
    try:
        if (i is not None):
            self.keyOrder.insert(i, key)
        else:
            self.keyOrder.append(key)
    except Error:
        self.keyOrder.insert(n, key)
        raise Error
