Revision 0a9a0e5a lib/utils/algo.py

b/lib/utils/algo.py
115 115
  return sorted(values, key=keyfunc)
116 116

  
117 117

  
118
def InvertDict(dict_in):
119
  """Inverts the key/value mapping of a dict.
120

  
121
  @param dict_in: The dict to invert
122
  @returns the inverted dict
123

  
124
  """
125
  return dict(zip(dict_in.values(), dict_in.keys()))
126

  
127

  
118 128
class RunningTimeout(object):
119 129
  """Class to calculate remaining timeout when doing several operations.
120 130

  

Also available in: Unified diff