This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author althonos2
Recipients althonos2, docs@python
Date 2021-02-04.14:28:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The documentation for `IOBase.readlines` states that the `hint` optional argument should be used like so (

> Read and return a list of lines from the stream. hint can be specified 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.

So in the case where `hint` is null, I would expect `readlines` to return an empty list.

However, this is neither the case for `io.BytesIO` nor for `io.FileIO`:

import io

# this evaluates to [b"abc\n", b"def\n", b"ghi\n"]

If this is the intended behaviour, the documentation should be updated, otherwise the code from the `io` module should be fixed.
Date User Action Args
2021-02-04 14:28:07althonos2setrecipients: + althonos2, docs@python
2021-02-04 14:28:07althonos2setmessageid: <>
2021-02-04 14:28:07althonos2linkissue43126 messages
2021-02-04 14:28:07althonos2create