summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorSandro Tosi <sandro.tosi@gmail.com>2012-01-17 17:57:30 (GMT)
committerSandro Tosi <sandro.tosi@gmail.com>2012-01-17 17:57:30 (GMT)
commit25e76bdb69572a004084ca5879b88f0f76c32822 (patch)
treeed02ed240d5790345e511d32693f3fe75de43dd5 /Doc
parent03c6110b21dc93b23f054f7674e9c2529fd44356 (diff)
downloadcpython-25e76bdb69572a004084ca5879b88f0f76c32822.zip
cpython-25e76bdb69572a004084ca5879b88f0f76c32822.tar.gz
cpython-25e76bdb69572a004084ca5879b88f0f76c32822.tar.bz2
file.next() doc refers to itself
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/stdtypes.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst
index 933e326..f54d8de 100644
--- a/Doc/library/stdtypes.rst
+++ b/Doc/library/stdtypes.rst
@@ -2372,12 +2372,12 @@ Files have the following methods:
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.