Antoine Pitrou <pit...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue9962>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to