Skip to content

Commit

Permalink
bpo-43126: Expand docs on io.IOBase.readlines() method (#27061)
Browse files Browse the repository at this point in the history
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
  • Loading branch information
akulakov and ambv committed Jul 13, 2021
1 parent 48a5aa7 commit 3b5b99d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Doc/library/io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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()``.

Expand Down

0 comments on commit 3b5b99d

Please sign in to comment.