[issue1103213] Adding the missing socket.recvall() method

Irmen de Jong report at bugs.python.org
Wed Mar 17 01:14:01 CET 2010


Irmen de Jong <irmen at razorvine.net> added the comment:

Ok I've looked at it again and think I can build an acceptable patch this time. However there are 2 things that I'm not sure of:

1) how to return the partial data to the application if the recv() loop fails before completion. Because the method will probably raise an exception on failure, as usual, it seems to me that the best place to put the partial data is inside the exception object. I can't think of another easy and safe way for the application to retrieve it otherwise. But, how is this achieved in code? I'll be using set_error() to return an error from my sock_recvall function I suppose.

2) the trunk is Python 2.7, should I make a separate patch for 3.x?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1103213>
_______________________________________


More information about the Python-bugs-list mailing list