def select_element(cache, selector):
 element = selector.element
 if ((not element) or (element == u'*')):
  for elem in cache.itertag():
   (yield elem)
 else:
  for elem in cache.element_map[ascii_lower(element)]:
   (yield elem)

def select_element ( cache , selector ) : element = selector . element if ( ( not element ) or ( element == u'*' ) ) : for elem in cache . itertag ( ) : ( yield elem ) else : for elem in cache . element_map [ ascii_lower ( element ) ] : ( yield elem )
a type or universal selector .