Documentation
Building on Issue #109532 for the socket HOWTO guide, I think it would be worthwhile to emphasize in the docs for socket.send that, in contrast to socket.recv, an OSError is raised for a broken connection. This change will hopefully clarify when the caller is responsible for handling a broken connection, that is, when socket.recv returns 0.
Linked PRs