mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
#15114: The html.parser module now raises a DeprecationWarning when the strict argument of HTMLParser or the HTMLParser.error method are used.
This commit is contained in:
parent
28f0beaff6
commit
88ebfb129b
4 changed files with 29 additions and 9 deletions
|
|
@ -74,7 +74,7 @@ as they are encountered::
|
|||
def handle_data(self, data):
|
||||
print("Encountered some data :", data)
|
||||
|
||||
parser = MyHTMLParser(strict=False)
|
||||
parser = MyHTMLParser()
|
||||
parser.feed('<html><head><title>Test</title></head>'
|
||||
'<body><h1>Parse me!</h1></body></html>')
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ examples::
|
|||
def handle_decl(self, data):
|
||||
print("Decl :", data)
|
||||
|
||||
parser = MyHTMLParser(strict=False)
|
||||
parser = MyHTMLParser()
|
||||
|
||||
Parsing a doctype::
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue