On Thu, Aug 19, 2010 at 10:31 AM, Sahasranaman MS <sah...@naman.ms> wrote:
> On Thursday 19 August 2010 07:08 AM, Kenneth Gonsalves wrote: > >> On Wed, 2010-08-18 at 10:28 -0700, Anand Shankar wrote: >> >>> I have no clues. Any inputs?? >>> >> sort order of dictionary keys is not guaranteed. Only a list will return >> items in the same order as entered. >> > Python has an OrderedDict class from Python 3.1 > http://docs.python.org/dev/whatsnew/3.1.html#pep-372-ordered-dictionaries > For older versions of python, there are several other implementations that > you could use. > > When I was writing my reply I was thinking - wasnt there something added recently which is a dictionary and was ordered. Unfortunately I'm stuck on 2.5, so havent used this one. Thanks for this. > _______________________________________________ > BangPypers mailing list > BangPypers@python.org > http://mail.python.org/mailman/listinfo/bangpypers > _______________________________________________ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers