(dict_obj)
Convenient method to yield sorted iteritems of a dictionary.
Convenient method to yield sorted iteritems of a dictionary.
Convenient method to yield sorted iteritems of a dictionary .
def OrderedItems(dict_obj):
  """Convenient method to yield sorted iteritems of a dictionary."""
  keys = dict_obj.keys()
  keys.sort()
  for k in keys:
    yield (k, dict_obj[k])
def OrderedItems ( dict_obj ) : keys = dict_obj . keys ( ) keys . sort ( ) for k in keys : yield ( k , dict_obj [ k ] )