[issue28236] In xml.etree.ElementTree Element can be created with empty and None tag

Gordon P. Hemsley report at bugs.python.org
Sat Dec 23 19:03:07 EST 2017


Gordon P. Hemsley <gphemsley at gphemsley.org> added the comment:

I disagree. This library is meant to be an interface onto XML syntax, and XML has pretty strict requirements on syntax. As msg277125 shows, you're liable to get very far downstream before the error becomes apparent.

In addition, I'm finding a number of internal inconsistencies, both between the docs and the code and between the Python code and the C code, that demonstrate that doing these type checks up front would be beneficial to the entire library. (Note: The C code also does not do them.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue28236>
_______________________________________


More information about the Python-bugs-list mailing list