[EMAIL PROTECTED] wrote in news:1184970471.146819.86280
@r34g2000hsd.googlegroups.com:
I am not sure about your scenario, but as you discovered the sort() method 
is modifying the in place list (and doesn't return a new one). 
If you just want to iterate over your dict in an ordered manner than all 
you have to do is:

for k in my_dict.keys().sort():
  # rest of the code

If you just want to keep a list of ordered keys you can probably do 
something like:

key_list = list(my_dict.keys())
key_list.sort()

bests,
./alex
--
.w( the_mindstorm )p.


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to