This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients eli.bendersky, scoder, serhiy.storchaka
Date 2017-09-30.09:39:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1506764340.64.0.213398074469.issue31648@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-09-30 09:39:00serhiy.storchakasetrecipients: + serhiy.storchaka, scoder, eli.bendersky
2017-09-30 09:39:00serhiy.storchakasetmessageid: <1506764340.64.0.213398074469.issue31648@psf.upfronthosting.co.za>
2017-09-30 09:39:00serhiy.storchakalinkissue31648 messages
2017-09-30 09:39:00serhiy.storchakacreate