Something I miss about C++ std::map (which is a sorted dictionary) is that looking up a key returns an iterator pointing to the correct location in the map. This means you can lookup a key and then start iterating from there, e.g. if the key is actually the beginning of a range you are interested in, or if you wanted "the item in my dictionary just after key".
Is there some other python dict that supports this kind of functionality?
In Python2.7+, you could use an OrderedDict:
yields
For Python2.6 or less, you could use the OrderedDict recipe.