summaryrefslogtreecommitdiffstats
path: root/Doc/library/socket.rst
diff options
context:
space:
mode:
authorHong Xu <hong@topbug.net>2021-11-13 06:02:04 (GMT)
committerGitHub <noreply@github.com>2021-11-13 06:02:04 (GMT)
commit4c792f39e688b11c7c19e411ed4f76a7baa44638 (patch)
tree80a63bae131a585d71e8bed07e8fd3cc570107cd /Doc/library/socket.rst
parentde3db1448b1b983eeb9f4498d07e3d2f1fb6d29d (diff)
downloadcpython-4c792f39e688b11c7c19e411ed4f76a7baa44638.zip
cpython-4c792f39e688b11c7c19e411ed4f76a7baa44638.tar.gz
cpython-4c792f39e688b11c7c19e411ed4f76a7baa44638.tar.bz2
bpo-45772: socket.socket should be a class instead of a function (GH-23960)
* bpo-45772: socket.socket should be a class instead of a function Currently `socket.socket` is documented as a function, but it is really a class (and thus has function-like usage to construct an object). This correction would ensure that Python projects that are interlinking Python's documentation can properly locate `socket.socket` as a type.
Diffstat (limited to 'Doc/library/socket.rst')
-rwxr-xr-xDoc/library/socket.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 831821b..d6edc05 100755
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -562,7 +562,7 @@ Creating sockets
The following functions all create :ref:`socket objects <socket-objects>`.
-.. function:: socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None)
+.. class:: socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None)
Create a new socket using the given address family, socket type and protocol
number. The address family should be :const:`AF_INET` (the default),