def findElementsWithAttributeShallow(parent, attribute):
 return findNodesShallow(parent, (lambda n: ((getattr(n, 'tagName', None) is not None) and n.hasAttribute(attribute))))

def findElementsWithAttributeShallow ( parent , attribute ) : return findNodesShallow ( parent , ( lambda n : ( ( getattr ( n , 'tagName' , None ) is not None ) and n . hasAttribute ( attribute ) ) ) )
return an iterable of the elements which are direct children of c{parent} and which have the c{attribute} attribute .