]> granicus.if.org Git - python/commitdiff
#3874: document HTMLParser.unknown_decl().
authorGeorg Brandl <georg@python.org>
Thu, 29 Jul 2010 13:38:37 +0000 (13:38 +0000)
committerGeorg Brandl <georg@python.org>
Thu, 29 Jul 2010 13:38:37 +0000 (13:38 +0000)
Doc/library/html.parser.rst

index ef0ae83acfc3bb3953690bacb4265244f7408dde..c38cf2a9dfb61586683fbf23eaf35d7c5ed1559b 100644 (file)
@@ -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)