def nvlist(thelist, names=None):
 for nvitem in thelist:
  if isinstance(nvitem, dict):
   (name, value) = next(six.iteritems(nvitem))
   if ((names is None) or (name in names)):
    (yield (nvitem, name, value))

def nvlist ( thelist , names = None ) : for nvitem in thelist : if isinstance ( nvitem , dict ) : ( name , value ) = next ( six . iteritems ( nvitem ) ) if ( ( names is None ) or ( name in names ) ) : ( yield ( nvitem , name , value ) )
given a list of items:: - whatever - name1: value1 - name2: - key: value - key: value return a generator that yields each tuple .