Martin Panter added the comment:

I can’t say I’ve often wanted this kind of method for socket objects. I guess 
this would treat a zero-length message (e.g. UDP datagram) as end-of-stream. 
Maybe it would be more useful as a general function or method for RawIOBase 
(maybe also BufferedIOBase) streams.

As for the exception, I have used the existing EOFError in the past for similar 
purposes. After all, an unexpected EOF error at a low level often means an 
incomplete or truncated data error at a higher level.

----------
nosy: +martin.panter

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

Reply via email to