Followup to r83869 and issue #8524: rename socket.forget() to socket.detach()
and make it return the file descriptor.
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 2b43266..f340920 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -538,6 +538,15 @@
connects.
+.. method:: socket.detach()
+
+ Put the socket object into closed state without actually closing the
+ underlying file descriptor. The file descriptor is returned, and can
+ be reused for other purposes.
+
+ .. versionadded:: 3.2
+
+
.. method:: socket.fileno()
Return the socket's file descriptor (a small integer). This is useful with
@@ -548,14 +557,6 @@
this limitation.
-.. method:: socket.forget()
-
- Put the socket object into closed state without actually closing the
- underlying file descriptor. This allows the latter to be reused.
-
- .. versionadded:: 3.2
-
-
.. method:: socket.getpeername()
Return the remote address to which the socket is connected. This is useful to