diff -r b110dd3d6cea Doc/library/socket.rst --- a/Doc/library/socket.rst Thu Jun 02 10:20:16 2016 -0700 +++ b/Doc/library/socket.rst Thu Jun 02 10:48:08 2016 -0700 @@ -931,12 +931,13 @@ .. method:: socket.fileno() - Return the socket's file descriptor (a small integer). This is useful with - :func:`select.select`. + Return the socket's file descriptor (a small integer), or -1 on failure. This + is useful with :func:`select.select`. Under Windows the small integer returned by this method cannot be used where a file descriptor can be used (such as :func:`os.fdopen`). Unix does not have - this limitation. + this limitation. In case of failure this method returns -1, it does not raise + any exception. .. method:: socket.get_inheritable()