Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment: I think the break in the loop for [.='text'] is not correct.
>>> from xml.etree import ElementTree as ET >>> e = >>> ET.XML('<root><a><b>text</b></a><a><b></b></a><a><b>text</b></a></root>') >>> list(e.findall('.//a[b="text"]')) [<Element 'a' at 0x7ffadb305d58>, <Element 'a' at 0x7ffadb305f58>] >>> list(e.findall('.//a[.="text"]')) [<Element 'a' at 0x7ffadb305d58>] I expect that findall() finds all matched elements, not just the first one. Both above requests should return the same result. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31648> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com