So you write: for key in sorted(dict.iterkeys()): ... do it ...
dict.iterkeys() returns an iterable which doesn't even have a sort-method; and somehow I find it unnatural to apply a 'sort' method to an iterator whereas I find it perfectly natural to feed an iterator to a function that does sorting for anything iterable... Cheers, --Tim -- http://mail.python.org/mailman/listinfo/python-list