Message303404
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. |
|
Date |
User |
Action |
Args |
2017-09-30 09:39:00 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, scoder, eli.bendersky |
2017-09-30 09:39:00 | serhiy.storchaka | set | messageid: <1506764340.64.0.213398074469.issue31648@psf.upfronthosting.co.za> |
2017-09-30 09:39:00 | serhiy.storchaka | link | issue31648 messages |
2017-09-30 09:39:00 | serhiy.storchaka | create | |
|