[Python-Dev] Fixing send()
Guido van Rossum
guido@python.org
Thu, 25 Oct 2001 11:16:29 -0400
[Jeremy]
> Can you offer a brief explanation of why we're doing this after all?
> I thought we concluded yesterday that we would fix this library.
> (That's what the last message before this one said.)
Fixing the library would mean adding a loop like this to each
application that uses send and currently doesn't check the return
value:
< sock.send(data)
---
> while data:
> n = sock.send(data)
> data = data[n:]
I find this more attractive:
< sock.send(data)
---
> sock.sendall(data)
--Guido van Rossum (home page: http://www.python.org/~guido/)