OrderedDict remembers the insertion order, it does not sort the keys. The OP should just store the smallest key in an additional variable. This just adds a constant overhead for every insert (one key comparison). Deletion is still slow, though.
Using floats as dictionary keys opens a whole can of worms with floating point precision, hopefully he is aware of that. -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage-support@googlegroups.com. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/groups/opt_out.