ahh, i hadn't thought of using a proirity queue but that is the correct solution most of the time, except i suppose when you have input that causes you to excessively reheap which could be problematic.
i may still look into writing a general sorted map though, it could be useful especially if there were and easy way to set the type of functionality required with out resorting to several different types of sorted-maps. -- http://mail.python.org/mailman/listinfo/python-list