Skip to content

Commit 0964fe4

Browse files
committed
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.
1 parent a56fbad commit 0964fe4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Doc/library/socket.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ Creating sockets
562562
The following functions all create :ref:`socket objects <socket-objects>`.
563563

564564

565-
.. function:: socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None)
565+
.. class:: socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None)
566566

567567
Create a new socket using the given address family, socket type and protocol
568568
number. The address family should be :const:`AF_INET` (the default),
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
``socket.socket`` is corrected to a class from a function.

0 commit comments

Comments
 (0)