Message254428
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. |
|
Date |
User |
Action |
Args |
2015-11-10 02:44:21 | martin.panter | set | recipients:
+ martin.panter, loewis, irmen, pitrou, vstinner, giampaolo.rodola |
2015-11-10 02:44:21 | martin.panter | set | messageid: <1447123461.18.0.273940764641.issue1103213@psf.upfronthosting.co.za> |
2015-11-10 02:44:21 | martin.panter | link | issue1103213 messages |
2015-11-10 02:44:19 | martin.panter | create | |
|