summaryrefslogtreecommitdiffstats
path: root/Doc/library/io.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-07-25 20:40:05 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-07-25 20:40:05 (GMT)
commitc5618f039d490c23a4297ae87668ac566e8d3b84 (patch)
tree9b3a44f710d249b67afc020929318b881abdaa0b /Doc/library/io.rst
parentf7dbb0f64e343c1263b55c51f30ac7877c247cf9 (diff)
parent707bd4e38516f7bb11434dd8590cc5bd0d4810f6 (diff)
downloadcpython-c5618f039d490c23a4297ae87668ac566e8d3b84.zip
cpython-c5618f039d490c23a4297ae87668ac566e8d3b84.tar.gz
cpython-c5618f039d490c23a4297ae87668ac566e8d3b84.tar.bz2
Mention the *limit* argument of TextIO.readline().
Diffstat (limited to 'Doc/library/io.rst')
-rw-r--r--Doc/library/io.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
index 5ac4499..23d6c6d 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -708,11 +708,13 @@ Text I/O
Read and return at most *n* characters from the stream as a single
:class:`str`. If *n* is negative or ``None``, reads until EOF.
- .. method:: readline()
+ .. method:: readline(limit=-1)
Read until newline or EOF and return a single ``str``. If the stream is
already at EOF, an empty string is returned.
+ If *limit* is specified, at most *limit* characters will be read.
+
.. method:: seek(offset, whence=SEEK_SET)
Change the stream position to the given *offset*. Behaviour depends