summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2003-10-18 09:38:01 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2003-10-18 09:38:01 (GMT)
commit849a972f35a6740c4784c80a8271af9f5592d7b6 (patch)
treeadbffae5b8d729458196b5ca56eb2f88c009396c /Doc
parentad3fc44ccb40f2ad33c0d09f5a2dfbd4feb442eb (diff)
downloadcpython-849a972f35a6740c4784c80a8271af9f5592d7b6.zip
cpython-849a972f35a6740c4784c80a8271af9f5592d7b6.tar.gz
cpython-849a972f35a6740c4784c80a8271af9f5592d7b6.tar.bz2
Patch #809535: Mention behaviour of seek on text files. Backported to 2.3.
Diffstat (limited to 'Doc')
-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 62f1644..531e385 100644
--- a/Doc/lib/libstdtypes.tex
+++ b/Doc/lib/libstdtypes.tex
@@ -1337,7 +1337,12 @@ flush the read-ahead buffer.
\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+'}).
+ opened in append mode with reading enabled (mode \code{'a+'}). If the
+ file is opened in text mode (mode \code{'t'}), only offsets returned
+ by \method{tell()} are legal. Use of other offsets causes undefined
+ behavior.
+
+ Note that not all file objects are seekable.
\end{methoddesc}
\begin{methoddesc}[file]{tell}{}