summaryrefslogtreecommitdiffstats
path: root/Doc/library/html.parser.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-07-29 13:38:37 (GMT)
committerGeorg Brandl <georg@python.org>2010-07-29 13:38:37 (GMT)
commit46aa5c5ba1a59d7afb1fd873edc3e6cbeff923e5 (patch)
treeb922f25d2f591c7301d4e998ebd139383586a2f6 /Doc/library/html.parser.rst
parent6d23c44ee513058ba272a0d6ad2066252684799c (diff)
downloadcpython-46aa5c5ba1a59d7afb1fd873edc3e6cbeff923e5.zip
cpython-46aa5c5ba1a59d7afb1fd873edc3e6cbeff923e5.tar.gz
cpython-46aa5c5ba1a59d7afb1fd873edc3e6cbeff923e5.tar.bz2
#3874: document HTMLParser.unknown_decl().
Diffstat (limited to 'Doc/library/html.parser.rst')
-rw-r--r--Doc/library/html.parser.rst16
1 files changed, 12 insertions, 4 deletions
diff --git a/Doc/library/html.parser.rst b/Doc/library/html.parser.rst
index ef0ae83..c38cf2a 100644
--- a/Doc/library/html.parser.rst
+++ b/Doc/library/html.parser.rst
@@ -134,10 +134,18 @@ An exception is defined as well:
.. method:: HTMLParser.handle_decl(decl)
- Method called when an SGML declaration is read by the parser. The *decl*
- parameter will be the entire contents of the declaration inside the ``<!``...\
- ``>`` markup. It is intended to be overridden by a derived class; the base
- class implementation does nothing.
+ Method called when an SGML ``doctype`` declaration is read by the parser.
+ The *decl* parameter will be the entire contents of the declaration inside
+ the ``<!...>`` markup. It is intended to be overridden by a derived class;
+ the base class implementation does nothing.
+
+
+.. method:: HTMLParser.unknown_decl(data)
+
+ Method called when an unrecognized SGML declaration is read by the parser.
+ The *data* parameter will be the entire contents of the declaration inside
+ the ``<!...>`` markup. It is sometimes useful to be be overridden by a
+ derived class; the base class implementation throws an :exc:`HTMLParseError`.
.. method:: HTMLParser.handle_pi(data)