Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(13)

Unified Diff: Doc/library/socket.rst

Issue 16802: fileno argument to socket.socket() undocumented
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Doc/library/socket.rst Fri Oct 02 13:14:03 2015 +0300
+++ b/Doc/library/socket.rst Fri Oct 02 14:45:48 2015 +0300
@@ -384,7 +384,11 @@
:const:`SOCK_DGRAM`, :const:`SOCK_RAW` or perhaps one of the other ``SOCK_``
constants. The protocol number is usually zero and may be omitted or in the
case where the address family is :const:`AF_CAN` the protocol should be one
- of :const:`CAN_RAW` or :const:`CAN_BCM`.
+ of :const:`CAN_RAW` or :const:`CAN_BCM`. If fileno is specified, the other
+ arguments are ignored, causing the socket with the specified file descriptor
+ to return. Unlike :meth:`fromfd`, fileno will return the same socket and not
+ a duplicate. This may help close a detached socket using
+ :meth:`socket.close()`.
The newly created socket is :ref:`non-inheritable <fd_inheritance>`.
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+