[Python-checkins] cpython (2.7): refer to file.readline() in stdtypes doc; thanks to Mihai Capotă from docs@
sandro.tosi
python-checkins at python.org
Sat Apr 28 12:53:02 CEST 2012
http://hg.python.org/cpython/rev/707905b3f8df
changeset: 76595:707905b3f8df
branch: 2.7
user: Sandro Tosi <sandro.tosi at gmail.com>
date: Sat Apr 28 12:50:42 2012 +0200
summary:
refer to file.readline() in stdtypes doc; thanks to Mihai Capotă from docs@
files:
Doc/library/stdtypes.rst | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2378,7 +2378,7 @@
make a :keyword:`for` loop the most efficient way of looping over the lines of a
file (a very common operation), the :meth:`~file.next` method uses a hidden read-ahead
buffer. As a consequence of using a read-ahead buffer, combining :meth:`~file.next`
- with other file methods (like :meth:`readline`) does not work right. However,
+ with other file methods (like :meth:`~file.readline`) does not work right. However,
using :meth:`seek` to reposition the file to an absolute position will flush the
read-ahead buffer.
@@ -2420,7 +2420,7 @@
.. method:: file.readlines([sizehint])
- Read until EOF using :meth:`readline` and return a list containing the lines
+ Read until EOF using :meth:`~file.readline` and return a list containing the lines
thus read. If the optional *sizehint* argument is present, instead of
reading up to EOF, whole lines totalling approximately *sizehint* bytes
(possibly after rounding up to an internal buffer size) are read. Objects
@@ -2500,7 +2500,7 @@
add line separators.)
Files support the iterator protocol. Each iteration returns the same result as
-``file.readline()``, and iteration ends when the :meth:`readline` method returns
+:meth:`~file.readline`, and iteration ends when the :meth:`~file.readline` method returns
an empty string.
File objects also offer a number of other interesting attributes. These are not
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list