[New-bugs-announce] [issue46375] io.BytesIO does not have peek()

Marcel Martin report at bugs.python.org
Fri Jan 14 05:39:24 EST 2022


New submission from Marcel Martin <python at marcelm.net>:

It would be great to be able to use peek() on BytesIO objects.

I have a function that gets passed a file-like object and uses peek() on it. This works for nearly all types of files relevant in my library, except BytesIO instances (which I use during testing), for which I need to add a small workaround using tell() and seek().

----------
components: Library (Lib)
messages: 410552
nosy: marcelm
priority: normal
severity: normal
status: open
title: io.BytesIO does not have peek()
type: enhancement
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46375>
_______________________________________


More information about the New-bugs-announce mailing list