[Python-checkins] cpython (3.2): Mention the *limit* argument of TextIO.readline().
antoine.pitrou
python-checkins at python.org
Wed Jul 25 22:42:19 CEST 2012
http://hg.python.org/cpython/rev/f8669955a13e
changeset: 78281:f8669955a13e
branch: 3.2
parent: 78279:e5d7d202f2bf
user: Antoine Pitrou <solipsis at pitrou.net>
date: Wed Jul 25 22:38:33 2012 +0200
summary:
Mention the *limit* argument of TextIO.readline().
files:
Doc/library/io.rst | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/Doc/library/io.rst b/Doc/library/io.rst
--- a/Doc/library/io.rst
+++ b/Doc/library/io.rst
@@ -699,11 +699,13 @@
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
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list