[docs] [issue16802] fileno argument to socket.socket() undocumented

Richard Oudkerk report at bugs.python.org
Mon Dec 31 12:40:52 CET 2012


Richard Oudkerk added the comment:

> The "fileno" argument looks like an implementation detail to me.

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()

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16802>
_______________________________________


More information about the docs mailing list