def namedChildren(parent, nodeName):
 return [n for n in parent.childNodes if (getattr(n, 'tagName', '') == nodeName)]

def namedChildren ( parent , nodeName ) : return [ n for n in parent . childNodes if ( getattr ( n , 'tagName' , '' ) == nodeName ) ]
namedchildren -> children of parent that have tagname == nodename .