If I create a Python dict which uses integers as keys, can I safely assume that iterating over the dict will retrieve items in order according to key value?
I don't think so. You have to make use of collections.OrderedDict in order to ensure ordering. However, this will sort the entries in the order they were added.