On Wed, Jul 28, 2010 at 9:06 PM, sturlamolden <sturlamol...@yahoo.no> wrote: > On 29 Jul, 03:47, Navkirat Singh <navkir...@gmail.com> wrote: >> I was wondering what would be better to do some medium to heavy book keeping >> in memory - Ordered Dictionary or a plain simple Dictionary object?? > > It depends on the problem. A dictionary is a hash table. An ordered > dictionary is a binary search tree (BST).
Er, if you're talking about collections.OrderedDict specifically, you're wrong. It's quite clearly implemented using a regular dictionary (i.e. hash table) and auxiliary list: See http://bugs.python.org/file13231/od7.diff from http://bugs.python.org/issue5397 Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list