On Oct 15, 8:27 am, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > I've never seen the point of a sorted dictionary, it's easy to just say: > > for key, value in sorted(D.items())
There are several applications that involve finding i such that key[i] <= query < key[i+1] where the keys are sorted and unique ... perhaps with a huge sentinel key at the end. Examples include sliding-scale taxes, and looking up prices for shares or managed funds. The code to do this in Python using the bisect module is about as clear as the equivalent SQL :-) -- http://mail.python.org/mailman/listinfo/python-list