Issue #10866: Add socket.sethostname(). Initial patch by Ross Lagerwall.
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 78b66e0..c456367 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -521,6 +521,16 @@
meanings.
+.. function:: sethostname(name)
+
+ Set the machine's hostname to *name*. This will raise a
+ :exc:`socket.error` if you don't have enough rights.
+
+ Availability: Unix.
+
+ .. versionadded:: 3.3
+
+
.. data:: SocketType
This is a Python type object that represents the socket object type. It is the