summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-07-25 20:38:33 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-07-25 20:38:33 (GMT)
commit707bd4e38516f7bb11434dd8590cc5bd0d4810f6 (patch)
tree3061c2f2c79c56a4b559fa1426d3617694e0e191 /Doc
parent393e23fbb578fff812e44aa71de1a1de01cb1c5b (diff)
downloadcpython-707bd4e38516f7bb11434dd8590cc5bd0d4810f6.zip
cpython-707bd4e38516f7bb11434dd8590cc5bd0d4810f6.tar.gz
cpython-707bd4e38516f7bb11434dd8590cc5bd0d4810f6.tar.bz2
Mention the *limit* argument of TextIO.readline().
Diffstat (limited to 'Doc')
-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 becc4a2..82f29cb 100644
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -699,11 +699,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