[issue45772] socket.socket should be a class instead of a function
Terry J. Reedy
report at bugs.python.org
Fri Nov 12 17:14:07 EST 2021
Terry J. Reedy <tjreedy at udel.edu> added the comment:
Filter, map, and zip are documented as functions to allow other interpreters to implement them as such, with generator functions. That does not apply here, but maybe there is another reason for socket being called a 'function.
Antoine, git blame credits you with socket.rst, line 565
.. function:: socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None)
https://docs.python.org/3/library/socket.html#socket.socket
PR-23960 changes 'function' to 'class'. What do you think?
----------
nosy: +pitrou, terry.reedy
stage: -> patch review
type: -> behavior
versions: -Python 3.6, Python 3.7, Python 3.8
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45772>
_______________________________________
More information about the Python-bugs-list
mailing list