[Python-checkins] Doc: Minor adjustment of `socket.create_server` docs (#26938)

erlend-aasland webhook-mailer at python.org
Fri May 20 04:18:30 EDT 2022


https://github.com/python/cpython/commit/a637c09a608cd779c9a7c3e60b886d9f520c58a6
commit: a637c09a608cd779c9a7c3e60b886d9f520c58a6
branch: main
author: Pavel <69010336+pavel-lexyr at users.noreply.github.com>
committer: erlend-aasland <erlend.aasland at protonmail.com>
date: 2022-05-20T10:18:02+02:00
summary:

Doc: Minor adjustment of `socket.create_server` docs (#26938)

- fix spelling in create_server() docs
- add a line about create_server() in the socket.py docstring

files:
M Doc/library/socket.rst
M Lib/socket.py

diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 95cd37a415df1..2d25646134a3d 100755
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -712,7 +712,7 @@ The following functions all create :ref:`socket objects <socket-objects>`.
 .. function:: create_server(address, *, family=AF_INET, backlog=None, reuse_port=False, dualstack_ipv6=False)
 
    Convenience function which creates a TCP socket bound to *address* (a 2-tuple
-   ``(host, port)``) and return the socket object.
+   ``(host, port)``) and returns the socket object.
 
    *family* should be either :data:`AF_INET` or :data:`AF_INET6`.
    *backlog* is the queue size passed to :meth:`socket.listen`; when ``0``
diff --git a/Lib/socket.py b/Lib/socket.py
index e08fb620eb1be..bfca763f72c82 100755
--- a/Lib/socket.py
+++ b/Lib/socket.py
@@ -28,6 +28,7 @@
 socket.setdefaulttimeout() -- set the default timeout value
 create_connection() -- connects to an address, with an optional timeout and
                        optional source address.
+create_server() -- create a TCP socket and bind it to a specified address.
 
  [*] not available on all platforms!
 



More information about the Python-checkins mailing list