Issue #8524: Add a forget() method to socket objects, so as to put the
socket into the closed state without closing the underlying file
descriptor.
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 75d86b7..2b43266 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -548,6 +548,14 @@
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