Message411294
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. |
|
Date |
User |
Action |
Args |
2022-01-22 22:08:29 | marcelm | set | recipients:
+ marcelm, benjamin.peterson, stutzbach, kumaraditya |
2022-01-22 22:08:29 | marcelm | set | messageid: <1642889309.54.0.706885273999.issue46375@roundup.psfhosted.org> |
2022-01-22 22:08:29 | marcelm | link | issue46375 messages |
2022-01-22 22:08:29 | marcelm | create | |
|