Author ned.deily
Recipients eli.bendersky, jlaurens, ned.deily, rhettinger, scoder
Date 2015-04-29.02:39:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1430275188.63.0.84037314703.issue24072@psf.upfronthosting.co.za>
In-reply-to
Content
While a bit confusing, I don't think this is a bug.  Note the definition of the "tail" attribute of an element:

"If the element is created from an XML file the attribute will contain any text found after the element’s end tag and before the next tag."

Unlike in root1 and root2 where 'TEXT' is before the end of element a and the start of element b (in root2), 'TEXT' in root3 follows the end tag of element b and so is associated with it as its tail attribute.

>>> root3
<Element 'a' at 0x1022ab188>
>>> root3[0]
<Element 'b' at 0x1022ab1d8>
>>> root3[0].tail
'TEXT'

https://docs.python.org/3/library/xml.etree.elementtree.html#xml.etree.ElementTree.Element.tail
History
Date User Action Args
2015-04-29 02:39:48ned.deilysetrecipients: + ned.deily, rhettinger, scoder, eli.bendersky, jlaurens
2015-04-29 02:39:48ned.deilysetmessageid: <1430275188.63.0.84037314703.issue24072@psf.upfronthosting.co.za>
2015-04-29 02:39:48ned.deilylinkissue24072 messages
2015-04-29 02:39:48ned.deilycreate