mirror of
https://github.com/python/cpython
synced 2024-09-05 00:05:39 +00:00
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.
This commit is contained in:
parent
de3db1448b
commit
4c792f39e6
|
@ -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),
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
``socket.socket`` documentation is corrected to a class from a function.
|
Loading…
Reference in a new issue