Commits

Antoine Pitrou  committed 03767b1 Draft

Mention the *limit* argument of TextIO.readline().

  • Participants
  • Parent commits f30b49a
  • Branches 2.7

Comments (0)

Files changed (1)

File Doc/library/io.rst

       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