def generateOnlyInterface(list, int):
 for n in list:
  if int.providedBy(n):
   (yield n)

def generateOnlyInterface ( list , int ) : for n in list : if int . providedBy ( n ) : ( yield n )
filters items in a list by class .