[issue24072] xml.etree.ElementTree.Element does not catch text

2015-04-28 Thread Ned Deily
Ned Deily added the comment: 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 ro

[issue24072] xml.etree.ElementTree.Element does not catch text

2015-04-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- Removed message: http://bugs.python.org/msg242208 ___ Python tracker ___ ___ Python-bugs-list mailin

[issue24072] xml.etree.ElementTree.Element does not catch text

2015-04-28 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- nosy: +eli.bendersky, scoder ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue24072] xml.etree.ElementTree.Element does not catch text

2015-04-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: What would you have it do in the general case, should it concatenate all the text in: >>> root4 = ET.fromstring('abcdefghi') >>> root4.text 'abc' If I'm interpreting the XML spec correctly ( http://www.w3.org/TR/2006/REC-xml-20060816/#sec-starttags section

[issue24072] xml.etree.ElementTree.Element does not catch text

2015-04-28 Thread Jérôme Laurens
New submission from Jérôme Laurens: text is not catcher in case 3 below INPUT import xml.etree.ElementTree as ET root1 = ET.fromstring('TEXT') print(root1.text) root2 = ET.fromstring('TEXT') print(root2.text) root3 = ET.fromstring('TEXT') print(root3.text) CURRENT OUTPUT TEXT TEXT None <-