def update(self, aliases):
    for (k, v) in aliases.items():
        try:
            v0 = self[k]
            if (v0.intervals != v.intervals):
                raise ValueError
            v0.aliaseds.extend(v.aliaseds)
            v0.distances.extend(v.distances)
        except KeyError:
            self[k] = v
def update(self, aliases):
    for (k, v) in aliases.items():
        try:
            v0 = self[k]
            if (v0.intervals != v.intervals):
                raise ValueError
            v0.aliaseds.extend(v.aliaseds)
            v0.distances.extend(v.distances)
        except KeyError:
            self[k] = v