[issue9962] GzipFile doesn't have peek()
Antoine Pitrou
report at bugs.python.org
Thu Sep 30 19:01:16 CEST 2010
Antoine Pitrou <pitrou at free.fr> added the comment:
Hir Nir,
> BufferedIOBase is not documented to have peek():
> http://docs.python.org/dev/py3k/library/io.html
Ah, you're right.
> Small note about patch:
> 1) IOError string says "read() on write-only...", should be "peek() on write-only..." ?
Indeed.
> 2) Should be min() in self._read(max(self.max_read_chunk, n))
Actually, I think I should have reproduced the algorithm in read(),
where there's a read_size distinct from the size requested by the user.
Thanks for the review, it looks like I should have waited a bit before
committing :)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9962>
_______________________________________
More information about the Python-bugs-list
mailing list