I think this is good. A SortedDict would be a more general structure, but in this case we need searchsorted only once, The structure would be a MultipleSortedDict.