Skip to content

Doc: Minor adjustment of socket.create_server docs #26938

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Doc/library/socket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,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.
Copy link
Contributor

@erlend-aasland erlend-aasland May 20, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: Other methods in this file are documented using the imperative mood. Rewording this whole section (this method) is out of scope of this PR, though.


*family* should be either :data:`AF_INET` or :data:`AF_INET6`.
*backlog* is the queue size passed to :meth:`socket.listen`; when ``0``
Expand Down
1 change: 1 addition & 0 deletions Lib/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!

Expand Down