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 scoder
Recipients eli.bendersky, gphemsley, py.user, rhettinger, scoder, serhiy.storchaka
Date 2017-12-24.09:59:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1514109592.35.0.213398074469.issue28236@psf.upfronthosting.co.za>
In-reply-to
Content
I also consider it an actual feature of ElementTree to allow arbitrary objects as its tags, even if it's not one of the most prominent. lxml cannot copy this because it is based on C libraries internally, but that shouldn't prevent ET from allowing it.

The fact that None tags disappear is also definitely a feature. It's an easy way to delete tags from trees without requiring any restructuring.

OTOH, whether an empty string should be serialised in the way the OP shows is not so clear. The output is not XML. I can't see any use case for this, but it feels like a potential source of bugs. I think it would be better to have the serialiser explicitly reject this than letting it silently generate broken output.

Not something to change in Py3.6, though.
History
Date User Action Args
2017-12-24 09:59:52scodersetrecipients: + scoder, rhettinger, eli.bendersky, py.user, serhiy.storchaka, gphemsley
2017-12-24 09:59:52scodersetmessageid: <1514109592.35.0.213398074469.issue28236@psf.upfronthosting.co.za>
2017-12-24 09:59:52scoderlinkissue28236 messages
2017-12-24 09:59:51scodercreate