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 santoso.wijaya
Recipients eli.bendersky, santoso.wijaya, scoder
Date 2014-05-01.15:43:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1398959020.93.0.673005149027.issue21403@psf.upfronthosting.co.za>
In-reply-to
Content
There is still a matter of inconsistency between the two implementations and between 2.7 and 3.x. IMO, the Python-based ElementTree implementation is more graceful at handling the "attrib" argument.

The signature of the factory function Element (and SubElement) in the doc is thus:

    class xml.etree.ElementTree.Element(tag, attrib={}, **extra)


which is fair game for the user to use "attrib" as a keyword argument.

Further, this serialization (in 3.x) does not really make sense, anyway:

>>> cET.tostring(root)
b'<root attrib="{\'Name\': \'Root\'}"><child attrib="{\'Name\': \'Child\'}" /></root>'
History
Date User Action Args
2014-05-01 15:43:41santoso.wijayasetrecipients: + santoso.wijaya, scoder, eli.bendersky
2014-05-01 15:43:40santoso.wijayasetmessageid: <1398959020.93.0.673005149027.issue21403@psf.upfronthosting.co.za>
2014-05-01 15:43:40santoso.wijayalinkissue21403 messages
2014-05-01 15:43:40santoso.wijayacreate