[Python-checkins] cpython (2.7): file.next() doc refers to itself

sandro.tosi python-checkins at python.org
Tue Jan 17 19:00:27 CET 2012


http://hg.python.org/cpython/rev/51e11b4937b7
changeset:   74469:51e11b4937b7
branch:      2.7
user:        Sandro Tosi <sandro.tosi at gmail.com>
date:        Tue Jan 17 18:57:30 2012 +0100
summary:
  file.next() doc refers to itself

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
@@ -2372,12 +2372,12 @@
    A file object is its own iterator, for example ``iter(f)`` returns *f* (unless
    *f* is closed).  When a file is used as an iterator, typically in a
    :keyword:`for` loop (for example, ``for line in f: print line``), the
-   :meth:`next` method is called repeatedly.  This method returns the next input
+   :meth:`~file.next` method is called repeatedly.  This method returns the next input
    line, or raises :exc:`StopIteration` when EOF is hit when the file is open for
    reading (behavior is undefined when the file is open for writing).  In order to
    make a :keyword:`for` loop the most efficient way of looping over the lines of a
-   file (a very common operation), the :meth:`next` method uses a hidden read-ahead
-   buffer.  As a consequence of using a read-ahead buffer, combining :meth:`next`
+   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,
    using :meth:`seek` to reposition the file to an absolute position will flush the
    read-ahead buffer.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list