diff options
author | Dong-hee Na <donghee.na@python.org> | 2022-08-18 11:16:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 11:16:33 (GMT) |
commit | 157aef79b07e07bf115e49cdf5ff25e74c66354e (patch) | |
tree | 31d1f5f372a024cc8f018802746d8eaf17659ad4 /Lib/html | |
parent | c5bc67b2a17d9053be9d0079eb7de948626d33c3 (diff) | |
download | cpython-157aef79b07e07bf115e49cdf5ff25e74c66354e.zip cpython-157aef79b07e07bf115e49cdf5ff25e74c66354e.tar.gz cpython-157aef79b07e07bf115e49cdf5ff25e74c66354e.tar.bz2 |
gh-95813: Improve HTMLParser from the view of inheritance (#95874)
* gh-95813: Improve HTMLParser from the view of inheritance
* gh-95813: Add unittest
* Address code review
Diffstat (limited to 'Lib/html')
-rw-r--r-- | Lib/html/parser.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/html/parser.py b/Lib/html/parser.py index bef0f4f..13c95c3 100644 --- a/Lib/html/parser.py +++ b/Lib/html/parser.py @@ -89,6 +89,7 @@ class HTMLParser(_markupbase.ParserBase): If convert_charrefs is True (the default), all character references are automatically converted to the corresponding Unicode characters. """ + super().__init__() self.convert_charrefs = convert_charrefs self.reset() @@ -98,7 +99,7 @@ class HTMLParser(_markupbase.ParserBase): self.lasttag = '???' self.interesting = interesting_normal self.cdata_elem = None - _markupbase.ParserBase.reset(self) + super().reset() def feed(self, data): r"""Feed data to the parser. |