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

This commit is contained in:
Antoine Pitrou 2012-07-25 22:38:33 +02:00
parent 393e23fbb5
commit 707bd4e385
1 changed files with 3 additions and 1 deletions

View File

@ -699,11 +699,13 @@ Text I/O
Read and return at most *n* characters from the stream as a single Read and return at most *n* characters from the stream as a single
:class:`str`. If *n* is negative or ``None``, reads until EOF. :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 Read until newline or EOF and return a single ``str``. If the stream is
already at EOF, an empty string is returned. 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) .. method:: seek(offset, whence=SEEK_SET)
Change the stream position to the given *offset*. Behaviour depends Change the stream position to the given *offset*. Behaviour depends