Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c05cbb0

Browse files
committed
Wrapped some long lines.
Cleaned up the table of error constants defined in pyexpat.errors; an extra pair of braces had pretty much destroyed the table! (Not sure why.) Moved the pyexpat.errors module documentation into a \section with the proper headers for a module.
1 parent 7bd9f41 commit c05cbb0

1 file changed

Lines changed: 48 additions & 34 deletions

File tree

Doc/lib/libpyexpat.tex

Lines changed: 48 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ \section{\module{pyexpat} ---
6868
\begin{methoddesc}{Parse}{data \optional{, isfinal}}
6969
Parses the contents of the string \var{data}, calling the appropriate
7070
handler functions to process the parsed data. \var{isfinal} must be
71-
true on the final call to this method. \var{data} can be the empty string at any time.
71+
true on the final call to this method. \var{data} can be the empty
72+
string at any time.
7273
\end{methoddesc}
7374

7475
\begin{methoddesc}{ParseFile}{file}
@@ -116,7 +117,11 @@ \section{\module{pyexpat} ---
116117
\end{datadesc}
117118

118119
Here is the list of handlers that can be set. To set a handler on an
119-
\class{xmlparser} object \var{o}, use \code{\var{o}.\var{handlername} = \var{func}}. \var{handlername} must be taken from the following list, and \var{func} must be a callable object accepting the correct number of arguments. The arguments are all strings, unless otherwise stated.
120+
\class{xmlparser} object \var{o}, use
121+
\code{\var{o}.\var{handlername} = \var{func}}. \var{handlername} must
122+
be taken from the following list, and \var{func} must be a callable
123+
object accepting the correct number of arguments. The arguments are
124+
all strings, unless otherwise stated.
120125

121126
\begin{methoddesc}{StartElementHandler}{name, attributes}
122127
Called for the start of every element. \var{name} is a string
@@ -187,39 +192,9 @@ \section{\module{pyexpat} ---
187192
\end{methoddesc}
188193

189194

195+
\subsection{Example \label{pyexpat-example}}
190196

191-
192-
193-
\subsection{\module{pyexpat.errors} -- Error constants}
194-
195-
The following table lists the error constants in the
196-
\module{pyexpat.errors} submodule, available once the \module{pyexpat} module has been imported.
197-
198-
\begin{tableii}{l|l}{code}{Constants}{}{}
199-
\lineii {XML_ERROR_ASYNC_ENTITY}
200-
{XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF}
201-
\lineii {XML_ERROR_BAD_CHAR_REF}
202-
{XML_ERROR_BINARY_ENTITY_REF}
203-
\lineii {XML_ERROR_DUPLICATE_ATTRIBUTE}
204-
{XML_ERROR_INCORRECT_ENCODING}
205-
\lineii {XML_ERROR_INVALID_TOKEN}
206-
{XML_ERROR_JUNK_AFTER_DOC_ELEMENT}
207-
\lineii {XML_ERROR_MISPLACED_XML_PI}
208-
{XML_ERROR_NO_ELEMENTS}
209-
\lineii {XML_ERROR_NO_MEMORY}
210-
{XML_ERROR_PARAM_ENTITY_REF}
211-
\lineii {XML_ERROR_PARTIAL_CHAR}
212-
{XML_ERROR_RECURSIVE_ENTITY_REF}
213-
\lineii {XML_ERROR_SYNTAX}
214-
{XML_ERROR_TAG_MISMATCH}
215-
\lineii {XML_ERROR_UNCLOSED_TOKEN}
216-
{XML_ERROR_UNDEFINED_ENTITY}
217-
\lineii {XML_ERROR_UNKNOWN_ENCODING}{}
218-
\end{tableii}
219-
220-
\subsection{Example}
221-
222-
The following program defines 3 handlers that just print out their
197+
The following program defines three handlers that just print out their
223198
arguments.
224199

225200
\begin{verbatim}
@@ -260,3 +235,42 @@ \subsection{Example}
260235
Character data: '\012'
261236
End element: parent
262237
\end{verbatim}
238+
239+
240+
\section{\module{pyexpat.errors} --- Error constants}
241+
242+
\declaremodule{builtin}{pyexpat.errors}
243+
\modulesynopsis{Error constants defined for the Expat parser}
244+
\moduleauthor{Paul Prescod}{[email protected]}
245+
\sectionauthor{A.M. Kuchling}{[email protected]}
246+
247+
The following table lists the error constants in the
248+
\module{pyexpat.errors} submodule, available once the
249+
\refmodule{pyexpat} module has been imported.
250+
251+
Note that this module cannot be imported directly until
252+
\refmodule{pyexpat} has been imported.
253+
254+
The following constants are defined:
255+
256+
\begin{tableii}{l|l}{code}{Constants}{}
257+
\lineii{XML_ERROR_ASYNC_ENTITY}
258+
{XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF}
259+
\lineii{XML_ERROR_BAD_CHAR_REF}
260+
{XML_ERROR_BINARY_ENTITY_REF}
261+
\lineii{XML_ERROR_DUPLICATE_ATTRIBUTE}
262+
{XML_ERROR_INCORRECT_ENCODING}
263+
\lineii{XML_ERROR_INVALID_TOKEN}
264+
{XML_ERROR_JUNK_AFTER_DOC_ELEMENT}
265+
\lineii{XML_ERROR_MISPLACED_XML_PI}
266+
{XML_ERROR_NO_ELEMENTS}
267+
\lineii{XML_ERROR_NO_MEMORY}
268+
{XML_ERROR_PARAM_ENTITY_REF}
269+
\lineii{XML_ERROR_PARTIAL_CHAR}
270+
{XML_ERROR_RECURSIVE_ENTITY_REF}
271+
\lineii{XML_ERROR_SYNTAX}
272+
{XML_ERROR_TAG_MISMATCH}
273+
\lineii{XML_ERROR_UNCLOSED_TOKEN}
274+
{XML_ERROR_UNDEFINED_ENTITY}
275+
\lineii{XML_ERROR_UNKNOWN_ENCODING}{}
276+
\end{tableii}

0 commit comments

Comments
 (0)