[issue9962] GzipFile doesn't have peek()

Antoine Pitrou report at bugs.python.org
Fri Oct 1 13:58:02 CEST 2010


Antoine Pitrou <pitrou at free.fr> added the comment:

> Right, I missed the change from self.max_read_chunk to 1024
> (read_size). Should not peek() limit to self.max_read_chunk as read()
> does?

This is used for the chunking of huge reads, but for peek():
1) there is no chunking (peek() should do at most one raw read)
2) huge reads are not really the use case peek() is intended for

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9962>
_______________________________________


More information about the Python-bugs-list mailing list