]> granicus.if.org Git - python/commitdiff
Mention the *limit* argument of TextIO.readline().
authorAntoine Pitrou <solipsis@pitrou.net>
Wed, 25 Jul 2012 20:38:33 +0000 (22:38 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Wed, 25 Jul 2012 20:38:33 +0000 (22:38 +0200)
Doc/library/io.rst

index becc4a20b3b8d191f2da6d12403a53c7f57bd4fe..82f29cb1b3e6dee7f002398eb51be7b469f6e806 100644 (file)
@@ -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