[New-bugs-announce] [issue31844] HTMLParser: undocumented not implemented method

Sebastian Rittau report at bugs.python.org
Mon Oct 23 04:27:23 EDT 2017


New submission from Sebastian Rittau <srittau at rittau.biz>:

HTMLParser derives from _markupbase.ParserBase, which has the following method:

class HTMLParser:

    ...

    def error(self, message):
        raise NotImplementedError(
            "subclasses of ParserBase must override error()")

HTMLParser does not implement this method and the documentation for HTMLParser (https://docs.python.org/3.6/library/html.parser.html) does not mention that its sub-classes need to override it.

I am not sure whether this is a documentation omission, whether HTMLParser should provide an (empty?) implementation, or whether ParserBase should not raise a NotImplementedError (to make linters happy).

----------
messages: 304782
nosy: srittau
priority: normal
severity: normal
status: open
title: HTMLParser: undocumented not implemented method
versions: Python 3.6

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


More information about the New-bugs-announce mailing list