[3.13] gh-110383: Document socket.makefile() accepts combined modes (GH-119150) (#119324)

The supported mode values are 'r', 'w', and 'b', or a combination of those.
(cherry picked from commit 62a29be5bb)

Co-authored-by: Daniel Williams <dann0a@gmail.com>
This commit is contained in:
Miss Islington (bot) 2024-05-21 20:44:53 +02:00 committed by GitHub
parent 11ca1d9d53
commit 256b791fd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View file

@ -306,7 +306,8 @@ def makefile(self, mode="r", buffering=None, *,
"""makefile(...) -> an I/O stream connected to the socket
The arguments are as for io.open() after the filename, except the only
supported mode values are 'r' (default), 'w' and 'b'.
supported mode values are 'r' (default), 'w', 'b', or a combination of
those.
"""
# XXX refactor to share code?
if not set(mode) <= {"r", "w", "b"}: