summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAndrew M. Kuchling <amk@amk.ca>2006-12-21 13:40:29 (GMT)
committerAndrew M. Kuchling <amk@amk.ca>2006-12-21 13:40:29 (GMT)
commit4a8d272dcaa2ac04855315b9082a3ce5f38e0dc0 (patch)
tree3c8e601fae34237acf6cd3199ab2ebeab479c0aa /Doc
parentb6060dbed12e0a4ede6880b7446004345e1f78d9 (diff)
downloadcpython-4a8d272dcaa2ac04855315b9082a3ce5f38e0dc0.zip
cpython-4a8d272dcaa2ac04855315b9082a3ce5f38e0dc0.tar.gz
cpython-4a8d272dcaa2ac04855315b9082a3ce5f38e0dc0.tar.bz2
Mention the os.SEEK_* constants
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libbz2.tex8
-rw-r--r--Doc/lib/libmmap.tex5
-rw-r--r--Doc/lib/libstdtypes.tex9
3 files changed, 13 insertions, 9 deletions
diff --git a/Doc/lib/libbz2.tex b/Doc/lib/libbz2.tex
index f40b66f..fe0e3af 100644
--- a/Doc/lib/libbz2.tex
+++ b/Doc/lib/libbz2.tex
@@ -90,10 +90,10 @@ performance optimizations previously implemented in the
\begin{methoddesc}[BZ2File]{seek}{offset\optional{, whence}}
Move to new file position. Argument \var{offset} is a byte count. Optional
-argument \var{whence} defaults to \code{0} (offset from start of file,
-offset should be \code{>= 0}); other values are \code{1} (move relative to
-current position, positive or negative), and \code{2} (move relative to end
-of file, usually negative, although many platforms allow seeking beyond
+argument \var{whence} defaults to \code{os.SEEK_SET} or \code{0} (offset from start of file;
+offset should be \code{>= 0}); other values are \code{os.SEEK_CUR} or \code{1} (move relative to
+current position; offset can be positive or negative), and \code{os.SEEK_END} or \code{2} (move relative to end
+of file; offset is usually negative, although many platforms allow seeking beyond
the end of a file).
Note that seeking of bz2 files is emulated, and depending on the parameters
diff --git a/Doc/lib/libmmap.tex b/Doc/lib/libmmap.tex
index 3dca40f..3763d4f 100644
--- a/Doc/lib/libmmap.tex
+++ b/Doc/lib/libmmap.tex
@@ -140,8 +140,9 @@ Memory-mapped file objects support the following methods:
\begin{methoddesc}{seek}{pos\optional{, whence}}
Set the file's current position. \var{whence} argument is optional
- and defaults to \code{0} (absolute file positioning); other values
- are \code{1} (seek relative to the current position) and \code{2}
+ and defaults to \code{os.SEEK_SET} or \code{0} (absolute file
+ positioning); other values are \code{os.SEEK_CUR} or \code{1} (seek
+ relative to the current position) and \code{os.SEEK_END} or \code{2}
(seek relative to the file's end).
\end{methoddesc}
diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex
index 0693f0d..012e59b 100644
--- a/Doc/lib/libstdtypes.tex
+++ b/Doc/lib/libstdtypes.tex
@@ -1678,9 +1678,12 @@ flush the read-ahead buffer.
\begin{methoddesc}[file]{seek}{offset\optional{, whence}}
Set the file's current position, like \code{stdio}'s \cfunction{fseek()}.
- The \var{whence} argument is optional and defaults to \code{0}
- (absolute file positioning); other values are \code{1} (seek
- relative to the current position) and \code{2} (seek relative to the
+ The \var{whence} argument is optional and defaults to
+ \code{os.SEEK_SET} or \code{0}
+ (absolute file positioning); other values are \code{os.SEEK_CUR} or \code{1}
+ (seek
+ relative to the current position) and \code{os.SEEK_END} or \code{2}
+ (seek relative to the
file's end). There is no return value. Note that if the file is
opened for appending (mode \code{'a'} or \code{'a+'}), any
\method{seek()} operations will be undone at the next write. If the