David Beazley <d...@dabeaz.com> added the comment: Have any other programming environments ever had a feature where a socket timeout returns an exception containing partial data? I'm not aware of one offhand and speaking as a systems programmer, something like this might be somewhat unexpected.
My concern is that in the presence of timeouts, the programmer will be forced to reassemble the message themselves from fragments returned in the exception. However, one reason for using readline() in the first place is precisely so that you don't have to do that sort of thing. Is there any reason why the input buffer can't be preserved across calls? You've already got a file-like wrapper around the socket. Just keep the unconsumed buffer in that instance. ---------- nosy: +dabeaz _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7322> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com