[issue42893] Strange XPath search behavior of xml.etree.ElementTree.Element.find

2021-01-14 Thread robpats
robpats added the comment: Thanks for the pointer. I didn't notice this paragraph. xml.etree.ElementTree.Element.find currently returns None if XPath expression is invalid or unsupported. I think it should also return None if position predicates are not preceded by a tag name. It wou

[issue42893] Strange XPath search behavior of xml.etree.ElementTree.Element.find

2021-01-11 Thread robpats
New submission from robpats : Python 3.6.8 / 3.7.9 / 3.8.7 >>> import xml.etree.ElementTree >>> e = xml.etree.ElementTree.fromstring('>> class="row"/>') >>> list(e) [, , , , , ] >>> e.find("./div[1]") >>> e