New submission from Marcel Martin :
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
Change by Marcel Martin :
--
keywords: +patch
pull_requests: +28996
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/30808
___
Python tracker
<https://bugs.python.org/issu
Marcel Martin added the comment:
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
Change by Marcel Martin :
--
nosy: +marcelm
___
Python tracker
<https://bugs.python.org/issue45387>
___
___
Python-bugs-list mailing list
Unsubscribe: