[issue8885] markupbase declaration errors aren't recoverable
Terry J. Reedy
report at bugs.python.org
Thu Dec 23 01:59:31 CET 2010
Terry J. Reedy <tjreedy at udel.edu> added the comment:
I verified the looping behavior of the testcase in both 2.7.1 and, with minor mods, 3.1.3 and 3.2b1, so this is a valid issue.
The HTMLParcer docs (2.7, 3.2) do not mention the .error method. The default is
def error(self, message):
raise HTMLParseError(message, self.getpos())
If this is *not* intended to be part of the api and over-ridden, the name should be changed to ._error and .error deprecated. If it is, it should be documented.
I think the self.error call should be followed either by j+=1 so parsing continues with the next char or by a raise statememt so it is definitely stopped.
----------
versions: +Python 3.1, Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8885>
_______________________________________
More information about the Python-bugs-list
mailing list