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 <rep...@bugs.python.org>
<http://bugs.python.org/issue24911>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to