Serhiy Storchaka added the comment:
> It has at least one potential use. On Windows socket.detach() returns a
> socket handle but there is no documented way to close it -- os.close()
> will not work. The only way to close it that I can see (without resorting
> to ctypes) is with something like
>
> socket.socket(fileno=handle).close()
There is an alternative (documented) interface:
socket.fromfd(handle, socket.AF_INET, socket.SOCK_STREAM).close()
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16802>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com