diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-25 20:38:33 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-25 20:38:33 (GMT) |
commit | b37f14c70e05cfc0487538c558323ea26f4ab603 (patch) | |
tree | 1e6ffd986a51e142373245f108910967f5512e0b | |
parent | 34e992d4513bebdc1f8286adee04cb666da75dde (diff) | |
download | cpython-b37f14c70e05cfc0487538c558323ea26f4ab603.zip cpython-b37f14c70e05cfc0487538c558323ea26f4ab603.tar.gz cpython-b37f14c70e05cfc0487538c558323ea26f4ab603.tar.bz2 |
Mention the *limit* argument of TextIO.readline().
-rw-r--r-- | Doc/library/io.rst | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/library/io.rst b/Doc/library/io.rst index 1d1f490..4319931 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 |