diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-05-21 18:52:56 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-21 18:52:56 (GMT) |
commit | a1c20529e2c63a549ce9197ec82f5d8fb597501e (patch) | |
tree | d1fff2b4ce6bad6f2ee0487c39a367114f4bcf97 /Doc/library | |
parent | 4dfba854ec9217e1a162c60187b00aa2f0564569 (diff) | |
download | cpython-a1c20529e2c63a549ce9197ec82f5d8fb597501e.zip cpython-a1c20529e2c63a549ce9197ec82f5d8fb597501e.tar.gz cpython-a1c20529e2c63a549ce9197ec82f5d8fb597501e.tar.bz2 |
[3.12] gh-110383: Document `socket.makefile()` accepts combined modes (GH-119150) (#119325)
The supported mode values are 'r', 'w', and 'b', or a combination of those.
(cherry picked from commit 62a29be5bb01c2d0f72d8f9b1b5539816e65310c)
Co-authored-by: Daniel Williams <dann0a@gmail.com>
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/socket.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst index cad03a9..10f03b3 100644 --- a/Doc/library/socket.rst +++ b/Doc/library/socket.rst @@ -1584,7 +1584,8 @@ to sockets. Return a :term:`file object` associated with the socket. The exact returned type depends on the arguments given to :meth:`makefile`. These arguments are interpreted the same way as by the built-in :func:`open` function, except - the only supported *mode* values are ``'r'`` (default), ``'w'`` and ``'b'``. + the only supported *mode* values are ``'r'`` (default), ``'w'``, ``'b'``, or + a combination of those. The socket must be in blocking mode; it can have a timeout, but the file object's internal buffer may end up in an inconsistent state if a timeout |