Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 89beb27

Browse files
committed
Issue #19234: Documents socket.fileno() returns -1 on failure
1 parent 32db438 commit 89beb27

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Doc/library/socket.rst

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,14 +927,13 @@ to sockets.
927927

928928
.. method:: socket.fileno()
929929

930-
Return the socket's file descriptor (a small integer). This is useful with
931-
:func:`select.select`.
930+
Return the socket's file descriptor (a small integer), or -1 on failure. This
931+
is useful with :func:`select.select`.
932932

933933
Under Windows the small integer returned by this method cannot be used where a
934934
file descriptor can be used (such as :func:`os.fdopen`). Unix does not have
935935
this limitation.
936936

937-
938937
.. method:: socket.get_inheritable()
939938

940939
Get the :ref:`inheritable flag <fd_inheritance>` of the socket's file

0 commit comments

Comments
 (0)