def generateElementsNamed(list, name):
 for n in list:
  if (IElement.providedBy(n) and (n.name == name)):
   (yield n)

def generateElementsNamed ( list , name ) : for n in list : if ( IElement . providedBy ( n ) and ( n . name == name ) ) : ( yield n )
filters element items in a list with matching name .