Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
f0ebbe0b
Commit
f0ebbe0b
authored
Mar 08, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-order some method descriptions for a more logical grouping.
(Based on reader comment!)
parent
9eb41557
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
25 deletions
+25
-25
Doc/lib/libmultifile.tex
Doc/lib/libmultifile.tex
+25
-25
No files found.
Doc/lib/libmultifile.tex
View file @
f0ebbe0b
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment