diff options
author | Fred Drake <fdrake@acm.org> | 2001-03-08 22:46:41 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2001-03-08 22:46:41 (GMT) |
commit | f0ebbe0bd038787f7fae041f2b8d630df68ba526 (patch) | |
tree | 761e00f19caf9b95c795e5c4dc74361f9d2693fe /Doc | |
parent | 9eb41557efeafaaac68503d3e19df994535c94df (diff) | |
download | cpython-f0ebbe0bd038787f7fae041f2b8d630df68ba526.zip cpython-f0ebbe0bd038787f7fae041f2b8d630df68ba526.tar.gz cpython-f0ebbe0bd038787f7fae041f2b8d630df68ba526.tar.bz2 |
Re-order some method descriptions for a more logical grouping.
(Based on reader comment!)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libmultifile.tex | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/Doc/lib/libmultifile.tex b/Doc/lib/libmultifile.tex index dd90b43..2d5bcdc 100644 --- a/Doc/lib/libmultifile.tex +++ b/Doc/lib/libmultifile.tex @@ -39,19 +39,6 @@ own pattern for section-divider and end-marker lines. A \class{MultiFile} instance has the following methods: -\begin{methoddesc}{push}{str} -Push a boundary string. When an appropriately decorated version of -this boundary is found as an input line, it will be interpreted as a -section-divider or end-marker. All subsequent -reads will return the empty string to indicate end-of-file, until a -call to \method{pop()} removes the boundary a or \method{next()} call -reenables it. - -It is possible to push more than one boundary. Encountering the -most-recently-pushed boundary will return EOF; encountering any other -boundary will raise an error. -\end{methoddesc} - \begin{methoddesc}{readline}{str} Read a line. If the line is data (not a section-divider or end-marker or real EOF) return it. If the line matches the most-recently-stacked @@ -71,18 +58,6 @@ Read all lines, up to the next section. Return them as a single (multiline) string. Note that this doesn't take a size argument! \end{methoddesc} -\begin{methoddesc}{next}{} -Skip lines to the next section (that is, read lines until a -section-divider or end-marker has been consumed). Return true if -there is such a section, false if an end-marker is seen. Re-enable -the most-recently-pushed boundary. -\end{methoddesc} - -\begin{methoddesc}{pop}{} -Pop a section boundary. This boundary will no longer be interpreted -as EOF. -\end{methoddesc} - \begin{methoddesc}{seek}{pos\optional{, whence}} Seek. Seek indices are relative to the start of the current section. The \var{pos} and \var{whence} arguments are interpreted as for a file @@ -93,6 +68,13 @@ seek. Return the file position relative to the start of the current section. \end{methoddesc} +\begin{methoddesc}{next}{} +Skip lines to the next section (that is, read lines until a +section-divider or end-marker has been consumed). Return true if +there is such a section, false if an end-marker is seen. Re-enable +the most-recently-pushed boundary. +\end{methoddesc} + \begin{methoddesc}{is_data}{str} Return true if \var{str} is data and false if it might be a section boundary. As written, it tests for a prefix other than \code{'-}\code{-'} at @@ -104,6 +86,24 @@ boundary tests; if it always returns false it will merely slow processing, not cause it to fail. \end{methoddesc} +\begin{methoddesc}{push}{str} +Push a boundary string. When an appropriately decorated version of +this boundary is found as an input line, it will be interpreted as a +section-divider or end-marker. All subsequent +reads will return the empty string to indicate end-of-file, until a +call to \method{pop()} removes the boundary a or \method{next()} call +reenables it. + +It is possible to push more than one boundary. Encountering the +most-recently-pushed boundary will return EOF; encountering any other +boundary will raise an error. +\end{methoddesc} + +\begin{methoddesc}{pop}{} +Pop a section boundary. This boundary will no longer be interpreted +as EOF. +\end{methoddesc} + \begin{methoddesc}{section_divider}{str} Turn a boundary into a section-divider line. By default, this method prepends \code{'-}\code{-'} (which MIME section boundaries have) but |