Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 95a7504

Browse files
committed
#7137: fix makefile() documentation to match the new parameters.
1 parent af7adad commit 95a7504

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

Doc/library/socket.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -564,17 +564,17 @@ correspond to Unix system calls applicable to sockets.
564564
is system-dependent (usually 5).
565565

566566

567-
.. method:: socket.makefile([mode[, bufsize]])
567+
.. method:: socket.makefile(mode='r', buffering=None, *, encoding=None, newline=None)
568568

569569
.. index:: single: I/O control; buffering
570570

571571
Return a :dfn:`file object` associated with the socket. (File objects are
572-
described in :ref:`bltin-file-objects`.) The file object
573-
references a :cfunc:`dup`\ ped version of the socket file descriptor, so the
574-
file object and socket object may be closed or garbage-collected independently.
575-
The socket must be in blocking mode (it can not have a timeout). The optional
576-
*mode* and *bufsize* arguments are interpreted the same way as by the built-in
577-
:func:`file` function.
572+
described in :ref:`bltin-file-objects`.) The file object references a
573+
:cfunc:`dup`\ ped version of the socket file descriptor, so the file object
574+
and socket object may be closed or garbage-collected independently. The
575+
socket must be in blocking mode (it can not have a timeout). The optional
576+
arguments are interpreted the same way as by the built-in :func:`open`
577+
function.
578578

579579

580580
.. method:: socket.recv(bufsize[, flags])

0 commit comments

Comments
 (0)