Charles-François Natali <neolo...@free.fr> added the comment:

> This is a hairy issue

Indeed.

Performing partial read/write may sound imperfect, but using buffered I/O 
around non-blockind FD is definitely not a good idea.
Also, the advantage of the current approach is that at least, no data is ever 
lost (and changing the behavior to raise a BlockingIOError might break some 
code out there in the wild).

Note that Java's BufferedInputStream and ReadableByteChannel also return 
partial reads.

So I'm somewhat inclined to keep the current behavior (it would however 
probably be a good idea to update the documentation to warn about this 
limitation, though).

----------

_______________________________________
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