[issue31455] ElementTree.XMLParser() mishandles exceptions

Stefan Behnel report at bugs.python.org
Sat Mar 31 04:28:04 EDT 2018


Stefan Behnel <stefan_ml at behnel.de> added the comment:

Right, Zachary, thanks for noticing. Py2.7 is actually way more different than I thought, and I hadn't paid enough attention to that. Py3 does all of this in "__init__", whereas Py2 essentially implements "__new__" in C, which requires more cleanup.

BTW, the implementation in Py3 would also benefit from refactoring the error handling code and moving it all in one place. But it shouldn't suffer from the same kind of problem, at least.

----------

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


More information about the Python-bugs-list mailing list