Mercurial > cpython-lru_cache-weakref
diff Doc/lib/libstdtypes.tex @ 36334:98faac1df5bb 2.4
Bug #1396471: Document that Windows' ftell() can return invalid
values for text files with UNIX-style line endings.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Fri, 20 Jan 2006 09:14:41 +0000 |
| parents | 834dd664aefc |
| children | dc6dec156869 |
line wrap: on
line diff
--- a/Doc/lib/libstdtypes.tex Fri Jan 20 09:07:55 2006 +0000 +++ b/Doc/lib/libstdtypes.tex Fri Jan 20 09:14:41 2006 +0000 @@ -625,7 +625,7 @@ \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 @@ \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}}
