Martin Panter added the comment: Thanks for the reviews. In this new patch, I modified two existing examples, but did not add any new example. Does that work for you Yury? Also modified example code for the socketserver module. Victor: IMO the “with conn” in the example is not overkill. It ensures the client connection socket is cleaned up, which is completely independent of the server listening socket s. What exceptions can you get out of conn.close()? I can only think of unusual programming errors like EBADF. I would prefer to remove close() as being redundant with the context manager. ---------- Added file: http://bugs.python.org/file41943/socket-context.v2.patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue24911> _______________________________________