I think it would make more sense to raise KeyError if there is no match.