diff options
author | Fred Drake <fdrake@acm.org> | 1996-10-09 16:13:22 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 1996-10-09 16:13:22 (GMT) |
commit | 8f925959c67cd61b71c8009e89c64b673effee91 (patch) | |
tree | 3828c10b751370aa6267344512c3308759098737 /Doc/lib/libformatter.tex | |
parent | 7edd8d3c58341ed900795f35c780d04648a56539 (diff) | |
download | cpython-8f925959c67cd61b71c8009e89c64b673effee91.zip cpython-8f925959c67cd61b71c8009e89c64b673effee91.tar.gz cpython-8f925959c67cd61b71c8009e89c64b673effee91.tar.bz2 |
(libhtmllib.tex, libsgmllib.tex, libformatter.tex):
Improve indexing somewhat. Add small intros to the "implementations"
sections of the formatter module doc.
Diffstat (limited to 'Doc/lib/libformatter.tex')
-rw-r--r-- | Doc/lib/libformatter.tex | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Doc/lib/libformatter.tex b/Doc/lib/libformatter.tex index c0ebab4..42783fb 100644 --- a/Doc/lib/libformatter.tex +++ b/Doc/lib/libformatter.tex @@ -46,11 +46,15 @@ be called without having to track whether the property was changed. The following attributes are defined for formatter instance objects: +\renewcommand{\indexsubitem}{(formatter object data)} + \begin{datadesc}{writer} The writer instance with which the formatter interacts. \end{datadesc} +\renewcommand{\indexsubitem}{(formatter object method)} + \begin{funcdesc}{end_paragraph}{blanklines} Close any open paragraphs and insert at least \code{blanklines} before the next paragraph. @@ -178,16 +182,25 @@ output. \subsection{Formatter Implementations} +Two implementations of formatter objects are provided by this module. +Most applications may use one of these classes without modification or +subclassing. + +\renewcommand{\indexsubitem}{(in module formatter)} + \begin{funcdesc}{NullFormatter}{\optional{writer\code{ = None}}} A formatter which does nothing. If \code{writer} is omitted, a \code{NullWriter} instance is created. No methods of the writer are -called by \code{NullWriter} instances. +called by \code{NullWriter} instances. Implementations should inherit +from this class if implementing a writer interface but don't need to +inherit any implementation. \end{funcdesc} \begin{funcdesc}{AbstractFormatter}{writer} The standard formatter. This implementation has demonstrated wide applicability to many writers, and may be used directly in most -circumstances. +circumstances. It has been used to implement a full-featured +world-wide web browser. \end{funcdesc} @@ -201,6 +214,8 @@ Note that while most applications can use the \code{AbstractFormatter} class as a formatter, the writer must typically be provided by the application. +\renewcommand{\indexsubitem}{(writer object method)} + \begin{funcdesc}{new_alignment}{align} Set the alignment style. The \code{align} value can be any object, but by convention is a string or \code{None}, where \code{None} @@ -283,6 +298,12 @@ will only be called at the beginning of a line. \subsection{Writer Implementations} +Three implementations of the writer object interface are provided as +examples by this module. Most applications will need to derive new +writer classes from the \code{NullWriter} class. + +\renewcommand{\indexsubitem}{(in module formatter)} + \begin{funcdesc}{NullWriter}{} A writer which only provides the interface definition; no actions are taken on any methods. This should be the base class for all writers |