import xml.etree.ElementTree as ET
e = ET.Element('Brock',Role="Bodyguard")
print bool(e)
Why is an xml.etree.ElementTree.Element
considered False
?
I know that I can do if e is not None
to check for existence. But I would strongly expect bool(e)
to return True
.