Message217708
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>' |
|
Date |
User |
Action |
Args |
2014-05-01 15:43:41 | santoso.wijaya | set | recipients:
+ santoso.wijaya, scoder, eli.bendersky |
2014-05-01 15:43:40 | santoso.wijaya | set | messageid: <1398959020.93.0.673005149027.issue21403@psf.upfronthosting.co.za> |
2014-05-01 15:43:40 | santoso.wijaya | link | issue21403 messages |
2014-05-01 15:43:40 | santoso.wijaya | create | |
|