[New-bugs-announce] [issue24072] xml.etree.ElementTree.Element does not catch text
Jérôme Laurens
report at bugs.python.org
Wed Apr 29 02:42:01 CEST 2015
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('<a>TEXT</a>')
print(root1.text)
root2 = ET.fromstring('<a>TEXT<b/></a>')
print(root2.text)
root3 = ET.fromstring('<a><b/>TEXT</a>')
print(root3.text)
CURRENT OUTPUT
TEXT
TEXT
None <---------- ERROR HERE
EXPECTED OUTPUT
TEXT
TEXT
TEXT
----------
messages: 242207
nosy: jlaurens
priority: normal
severity: normal
status: open
title: xml.etree.ElementTree.Element does not catch text
type: behavior
versions: Python 3.4
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24072>
_______________________________________
More information about the New-bugs-announce
mailing list