Fuzzyman wrote: > You will be able to mutate the the keys list through : > > d1 = OrderedDict(some_sequence_of_items) > keys = d1.keys() > keys.sort() # or other mutation > d1.keys(keys) > > Admittedly this is a lot slower than : > > d1 = OrderedDict(some_sequence_of_items) > d1.sequence.sort() > > *but* it frees the squence attribute from any implementation details.
You should also implement d1.sort() or d1.sortkeys() which will have no performance drawbacks. -- Christoph -- http://mail.python.org/mailman/listinfo/python-list