]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Doc: Minor adjustment of `socket.create_server` docs (#26938)
authorPavel <69010336+pavel-lexyr@users.noreply.github.com>
Fri, 20 May 2022 08:18:02 +0000 (04:18 -0400)
committerGitHub <noreply@github.com>
Fri, 20 May 2022 08:18:02 +0000 (10:18 +0200)
- fix spelling in create_server() docs
- add a line about create_server() in the socket.py docstring

Doc/library/socket.rst
Lib/socket.py

index 95cd37a415df1e67fb6efa7cbdc87acef3351b39..2d25646134a3d1d60d23759e315762fd79b7a7c6 100755 (executable)
@@ -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``
index e08fb620eb1be2264897fa48db0a486b2d99e0a0..bfca763f72c82621ca4b9acb476b1dd7f39ce9fd 100755 (executable)
@@ -28,6 +28,7 @@ socket.getdefaulttimeout() -- get the default timeout value
 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!