From: andrei kulakov Date: Tue, 13 Jul 2021 14:07:56 +0000 (-0400) Subject: bpo-43126: Expand docs on io.IOBase.readlines() method (#27061) X-Git-Tag: v3.11.0a1~691 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3b5b99da4b256a31933112f4a2385386149c19e1;p=thirdparty%2FPython%2Fcpython.git bpo-43126: Expand docs on io.IOBase.readlines() method (#27061) Co-authored-by: Ɓukasz Langa --- diff --git a/Doc/library/io.rst b/Doc/library/io.rst index f9ffc19fac48..0881015c7fad 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -391,6 +391,9 @@ I/O Base Classes to control the number of lines read: no more lines will be read if the total size (in bytes/characters) of all lines so far exceeds *hint*. + *hint* values of ``0`` or less, as well as ``None``, are treated as no + hint. + Note that it's already possible to iterate on file objects using ``for line in file: ...`` without calling ``file.readlines()``.