def _iter_data(data):
 if isinstance(data, MultiDict):
  for (key, values) in data.iterlists():
   for value in values:
    (yield (key, value))
 else:
  for (key, values) in data.iteritems():
   if isinstance(values, list):
    for value in values:
     (yield (key, value))
   else:
    (yield (key, values))

def _iter_data ( data ) : if isinstance ( data , MultiDict ) : for ( key , values ) in data . iterlists ( ) : for value in values : ( yield ( key , value ) ) else : for ( key , values ) in data . iteritems ( ) : if isinstance ( values , list ) : for value in values : ( yield ( key , value ) ) else : ( yield ( key , values ) )
iterates over a dict or multidict yielding all keys and values .