[issue6265] cElementTree & ElementTree use different exceptions for XML Errors

Neil Muller report at bugs.python.org
Thu Jun 11 12:46:47 CEST 2009


New submission from Neil Muller <drnlmuller+bugs at gmail.com>:

cElementTree will raise a SyntaxError on XML parsing errors, while
ElementTree will raise ExpatError.  This makes changing between the two
a bit more problematic than it could be. See for example
https://lists.canonical.com/archives/bazaar/2006q3/017491.html

ElementTree 1.3 raises a ParseError, which is subclassed from
SyntaxError, which will improve the situation when it's merged, but
cElementTree should be adjusted to raise the same error.

----------
messages: 89247
nosy: Neil Muller, effbot, jerith
severity: normal
status: open
title: cElementTree & ElementTree use different exceptions for XML Errors
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6265>
_______________________________________


More information about the Python-bugs-list mailing list