Xiang Zhang added the comment:
The "compressed stream" is not the underlying file object but _GzipReader. And
actually the "at most one single reader" is the characteristic of
io.BufferedReader.peek, you can see it in the doc. Maybe it needs multiple
reads on the file object in a single peek, but they are all encapsulated in the
_GzipReader.read. So at the point of GzipFile.peek, it's still a single read.
Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list