sbt <shibt...@gmail.com> added the comment:

No one has suggested raising BlockingIOError and DISCARDING the data when a 
partial read has occurred.  The docs seem to imply that the partially read data 
should be returned since they only say that BlockingIOError should be raised if 
there is NOTHING to read.  Clearly this should all be spelt out properly.

That leaves the question of whether, when there is NOTHING to read, 
BlockingIOError should be raised (as the docs say) or None should be returned 
(as is done now).  I don't mind either way as long as the docs match reality.

The part which really needs addressing is partial writes.  Currently, if a 
write fails with EAGAIN then IOError is raised and there is no way to work out 
how much data was written/buffered.  The docs say that BlockingIOError should 
be raised with the e.args[2] set to indicate the number of bytes 
written/buffered.  This at least should be fixed.

I will work on a patch.

----------

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

Reply via email to