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 marcelm
Recipients benjamin.peterson, kumaraditya, marcelm, stutzbach
Date 2022-01-22.22:08:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1642889309.54.0.706885273999.issue46375@roundup.psfhosted.org>
In-reply-to
Content
I opened a PR, but I now wonder whether the missing peek() is by design.

First, I noticed that instead of using BytesIO directly, I can wrap the instance in an io.BufferedReader, which does have peek(). (It’s just a bit inconvenient.)

The second thing is that BytesIO is currently documented to inherit from BufferedIOBase, but if peek() is implemented, one could argue that BytesIO now should inherit from BufferedReader because it then has all the methods. And that seems to great a change from my perspective.

I’ll defer to someone more knowledgeable and do not mind at all if this issue is closed without action.
History
Date User Action Args
2022-01-22 22:08:29marcelmsetrecipients: + marcelm, benjamin.peterson, stutzbach, kumaraditya
2022-01-22 22:08:29marcelmsetmessageid: <1642889309.54.0.706885273999.issue46375@roundup.psfhosted.org>
2022-01-22 22:08:29marcelmlinkissue46375 messages
2022-01-22 22:08:29marcelmcreate