On Thursday 31 July 2008 05:33, Monika Jisswel wrote: > Python dictionaries are not ordered & the order you will get when you print > a dictionary is the order that the python virtual machines thinks optimal > for that dictionary for its own internal procedures.
If you need an ordered dictionary, such things exist. The implementation I use is at http://www.voidspace.org.uk/python/modules.shtml, but there may be one or two other popular ones out there. You probably shouldn't use them unless you have a specific need to. They will be a lot slower, and extra dependencies always complicates distribution. Cheers _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor