From a3d20bfee38c71df88d69064d47fe98a1d59e624 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Tue, 13 Jul 2021 07:41:31 -0700 Subject: [PATCH] bpo-43126: Expand docs on io.IOBase.readlines() method (GH-27061) (#27114) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ɓukasz Langa (cherry picked from commit 3b5b99da4b256a31933112f4a2385386149c19e1) Co-authored-by: andrei kulakov --- Doc/library/io.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/library/io.rst b/Doc/library/io.rst index 96e02e839ae..0ff05cfc0e0 100644 --- a/Doc/library/io.rst +++ b/Doc/library/io.rst @@ -315,6 +315,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()``.