diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-25 20:40:05 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-25 20:40:05 (GMT) |
commit | c5618f039d490c23a4297ae87668ac566e8d3b84 (patch) | |
tree | 9b3a44f710d249b67afc020929318b881abdaa0b /Doc/library/io.rst | |
parent | f7dbb0f64e343c1263b55c51f30ac7877c247cf9 (diff) | |
parent | 707bd4e38516f7bb11434dd8590cc5bd0d4810f6 (diff) | |
download | cpython-c5618f039d490c23a4297ae87668ac566e8d3b84.zip cpython-c5618f039d490c23a4297ae87668ac566e8d3b84.tar.gz cpython-c5618f039d490c23a4297ae87668ac566e8d3b84.tar.bz2 |
Mention the *limit* argument of TextIO.readline().
Diffstat (limited to 'Doc/library/io.rst')
-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 5ac4499..23d6c6d 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -708,11 +708,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 |