From: Antoine Pitrou Date: Wed, 25 Jul 2012 20:38:33 +0000 (+0200) Subject: Mention the *limit* argument of TextIO.readline(). X-Git-Tag: v2.7.4rc1~685 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b37f14c70e05cfc0487538c558323ea26f4ab603;p=thirdparty%2FPython%2Fcpython.git Mention the *limit* argument of TextIO.readline(). --- diff --git a/Doc/library/io.rst b/Doc/library/io.rst index 1d1f490c3383..43199316118f 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -696,11 +696,13 @@ Text I/O Read and return at most *n* characters from the stream as a single :class:`unicode`. If *n* is negative or ``None``, reads until EOF. - .. method:: readline() + .. method:: readline(limit=-1) Read until newline or EOF and return a single ``unicode``. 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