Serhiy Storchaka added the comment:

I think the patch is wrong or is not optimal for case when chars is -1, but 
size is not.

If we want to read all data in any case, then we should call self.stream.read() 
without argument if chars < 0 or size < 0.

If we want to read no more than size bytes, then all loop code should be 
totally rewritten.

Perhaps I am wrong.

----------
nosy: +serhiy.storchaka
versions: +Python 3.4

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue8260>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to