Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libhtmlparser.tex @ 33438:a243296786ce legacy-trunk
document the exceptions raised by sgmllib, htmllib, and HTMLParser
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Fri, 10 Sep 2004 01:20:21 +0000 |
| parents | 6c3c3b771abc |
| children | 6e0b053c6cf7 |
line wrap: on
line diff
--- a/Doc/lib/libhtmlparser.tex Fri Sep 10 01:16:49 2004 +0000 +++ b/Doc/lib/libhtmlparser.tex Fri Sep 10 01:20:21 2004 +0000 @@ -4,6 +4,8 @@ \declaremodule{standard}{HTMLParser} \modulesynopsis{A simple parser that can handle HTML and XHTML.} +\versionadded{2.2} + This module defines a class \class{HTMLParser} which serves as the basis for parsing text files formatted in HTML\index{HTML} (HyperText Mark-up Language) and XHTML.\index{XHTML} Unlike the parser in @@ -23,6 +25,17 @@ elements which are closed implicitly by closing an outer element. \end{classdesc} +An exception is defined as well: + +\begin{excdesc}{HTMLParseError} +Exception raised by the \class{HTMLParser} class when it encounters an +error while parsing. This exception provides three attributes: +\member{msg} is a brief message explaining the error, \member{lineno} +is the number of the line on which the broken construct was detected, +and \member{offset} is the number of characters into the line at which +the construct starts. +\end{excdesc} + \class{HTMLParser} instances have the following methods:
