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 gphemsley
Recipients eli.bendersky, gphemsley, py.user, rhettinger, scoder, serhiy.storchaka
Date 2017-12-24.18:36:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1514140619.51.0.213398074469.issue28236@psf.upfronthosting.co.za>
In-reply-to
Content
To be clear, we are talking about the Element class of the ElementTree module, which is distinct from the ElementTree class of the same module.

That said, I personally question the implementation decision to represent things like treating comments as an Element with a tag of a Comment function. The XML standard is pretty clear that neither comments nor processing instructions are in fact elements, and I don't see it as a Good Thing that arbitrary objects are allowed as the value of tag, unless there is a requirement that such objects are subclasses of str.

Note also that the documentation makes no mention of tag being anything other than a string. And there is inconsistency with where bytes are supposedly allowed (according to the documentation) and where they're actually allowed (according to the code). Given this, I think it's hard to say what user code is expected to make use of.
History
Date User Action Args
2017-12-24 18:36:59gphemsleysetrecipients: + gphemsley, rhettinger, scoder, eli.bendersky, py.user, serhiy.storchaka
2017-12-24 18:36:59gphemsleysetmessageid: <1514140619.51.0.213398074469.issue28236@psf.upfronthosting.co.za>
2017-12-24 18:36:59gphemsleylinkissue28236 messages
2017-12-24 18:36:59gphemsleycreate