[issue26210] `HTMLParser.handle_data` may be invoked although `HTMLParser.reset` was invoked

Yannick Duchêne report at bugs.python.org
Wed Jan 27 05:06:13 EST 2016


Yannick Duchêne added the comment:

> And I don't see how to stop the process either.

I just did it with `raise StopIteration`, caught at a proper place (in the procedure which invokes `feed` and `close`), and it seems to be fine, I have no more strange behaviours. At least, I cannot see a cleaner way.

Now `reset` is invoked after end of parsing only (thus to be able to have a next round).

----------

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


More information about the Python-bugs-list mailing list