summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-01-20 09:14:36 (GMT)
committerGeorg Brandl <georg@python.org>2006-01-20 09:14:36 (GMT)
commita3a93ae7c82542644c558a42141651cd74bfd81f (patch)
tree6fdbe23d75ef1602895326a36bda3c5a0b106cb1 /Doc
parentb709c2caba3c781d0f4602f28227993e565f0a87 (diff)
downloadcpython-a3a93ae7c82542644c558a42141651cd74bfd81f.zip
cpython-a3a93ae7c82542644c558a42141651cd74bfd81f.tar.gz
cpython-a3a93ae7c82542644c558a42141651cd74bfd81f.tar.bz2
Bug #1396471: Document that Windows' ftell() can return invalid
values for text files with UNIX-style line endings.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libstdtypes.tex6
1 files changed, 5 insertions, 1 deletions
diff --git a/Doc/lib/libstdtypes.tex b/Doc/lib/libstdtypes.tex
index 656cb73..c2a7c88 100644
--- a/Doc/lib/libstdtypes.tex
+++ b/Doc/lib/libstdtypes.tex
@@ -625,7 +625,7 @@ characters is assumed.
\begin{methoddesc}[string]{find}{sub\optional{, start\optional{, end}}}
Return the lowest index in the string where substring \var{sub} is
found, such that \var{sub} is contained in the range [\var{start},
-\var{end}). Optional arguments \var{start} and \var{end} are
+\var{end}]. Optional arguments \var{start} and \var{end} are
interpreted as in slice notation. Return \code{-1} if \var{sub} is
not found.
\end{methoddesc}
@@ -1598,6 +1598,10 @@ flush the read-ahead buffer.
\begin{methoddesc}[file]{tell}{}
Return the file's current position, like \code{stdio}'s
\cfunction{ftell()}.
+
+ \note{On Windows, \method{tell()} can return illegal values (after an
+ \cfunction{fgets()}) when reading files with \UNIX{}-style line-endings.
+ Use binary mode (\code{'rb'}) to circumvent this problem.}
\end{methoddesc}
\begin{methoddesc}[file]{truncate}{\optional{size}}