On Sat, 25 Oct 2008 21:53:10 +0000, Lie Ryan wrote: > Oh no, the two dict implementation would work _exactly_ the same from > the outside, they are transparently interchangeable. Only the > performance characteristic differs because of the different > implementation.
They are not 100% interchangeably. Dictionaries as implemented need keys to be hashable objects and sorted dictionaries need the keys to have an order defined. So switching mapping types may fail unless the key objects already have the needed magic methods implemented to do the right thing. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list