summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-01-04 05:16:39 (GMT)
committerFred Drake <fdrake@acm.org>2001-01-04 05:16:39 (GMT)
commit19ae78302e9ea4c72b0b5ea1ce96e8d34ddb241a (patch)
tree36db1e66f328f223ede3b6f730e3d7605f73f370 /Doc/lib
parent22e9a5eaec5b87a29167f0ba00aebf206b96fbeb (diff)
downloadcpython-19ae78302e9ea4c72b0b5ea1ce96e8d34ddb241a.zip
cpython-19ae78302e9ea4c72b0b5ea1ce96e8d34ddb241a.tar.gz
cpython-19ae78302e9ea4c72b0b5ea1ce96e8d34ddb241a.tar.bz2
Added information about the interaction of opening a file in append mode
and seek() in the description of seek(). This closes SF bug #126850.
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libstdtypes.tex7
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex
index da7ef0d..0cb8264 100644
--- a/Doc/lib/libstdtypes.tex
+++ b/Doc/lib/libstdtypes.tex
@@ -1079,7 +1079,12 @@ Files have the following methods:
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
- file's end). There is no return value.
+ 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
+ file is only opened for writing in append mode (mode \code{'a'}),
+ this method is essentially a no-op, but it remains useful for files
+ opened in append mode with reading enabled (mode \code{'a+'}).
\end{methoddesc}
\begin{methoddesc}[file]{tell}{}