]> granicus.if.org Git - python/commitdiff
Merged revisions 83223 via svnmerge from
authorGeorg Brandl <georg@python.org>
Sun, 1 Aug 2010 21:10:57 +0000 (21:10 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 1 Aug 2010 21:10:57 +0000 (21:10 +0000)
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r83223 | georg.brandl | 2010-07-29 15:38:37 +0200 (Do, 29 Jul 2010) | 1 line

  #3874: document HTMLParser.unknown_decl().
........

Doc/library/htmlparser.rst

index a5c185cd736d6c7c1f0c8dd63b1b943e779c328b..7b0ce03a07be8542046c7b6aafa11c6e7cb1271a 100644 (file)
@@ -148,10 +148,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)