#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:
Ezio Melotti 2013-11-02 17:08:24 +02:00
parent 28f0beaff6
commit 88ebfb129b
4 changed files with 29 additions and 9 deletions

View file

@ -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::