diff options
| author | Ezio Melotti <ezio.melotti@gmail.com> | 2013-04-15 19:08:31 +0300 |
|---|---|---|
| committer | Ezio Melotti <ezio.melotti@gmail.com> | 2013-04-15 19:08:31 +0300 |
| commit | ed3cd7e445e7be413d1b454471454f7ff9f21f1f (patch) | |
| tree | 146e7c94d722abcfe6fc1a693be999328ebdf71d /Doc/library | |
| parent | 45fe62dc9c406f1c2520867d99e557ac227f9bfb (diff) | |
| download | cpython-git-ed3cd7e445e7be413d1b454471454f7ff9f21f1f.tar.gz | |
#13510: clarify that f.readlines() is note necessary to iterate over a file. Patch by Dan Riti.
Diffstat (limited to 'Doc/library')
| -rw-r--r-- | Doc/library/io.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst index a8d5fe3667..8f3964f595 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -298,6 +298,9 @@ I/O Base Classes to control the number of lines read: no more lines will be read if the total size (in bytes/characters) of all lines so far exceeds *hint*. + Note that it's already possible to iterate on file objects using ``for + line in file: ...`` without calling ``file.readlines()``. + .. method:: seek(offset, whence=SEEK_SET) Change the stream position to the given byte *offset*. *offset* is |
