[issue21403] cElementTree node creation with attributes is bugged

Santoso Wijaya report at bugs.python.org
Wed Apr 30 22:59:34 CEST 2014


Santoso Wijaya added the comment:

Or, more succintly:


Python 2.7.6 (default, Mar 22 2014, 22:59:56) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import xml.etree.ElementTree as ET
>>> root = ET.Element('Root', attrib={'Name':'Root'})
>>> root.attrib
{'Name': 'Root'}



>>> import xml.etree.cElementTree as cET
>>> root = cET.Element('Root', attrib={'Name':'Root'})
>>> root.attrib
{'attrib': {'Name': 'Root'}}

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21403>
_______________________________________


More information about the Python-bugs-list mailing list