diff options
| author | Berker Peksag <berker.peksag@gmail.com> | 2016-02-18 15:34:32 (GMT) |
|---|---|---|
| committer | Berker Peksag <berker.peksag@gmail.com> | 2016-02-18 15:34:32 (GMT) |
| commit | 31a252b7f3d4fd5af91d388daac6fce6c3115a22 (patch) | |
| tree | 982c60aea5fe9431338150e3a7cf405af3c43ae0 /Lib/socket.py | |
| parent | a2b64e630e54027b5f49bf9f6cbdd4efb51aba4e (diff) | |
| parent | 3fe64d0c5ca5f1dc9723b9ef436d033f390b19f0 (diff) | |
| download | cpython-31a252b7f3d4fd5af91d388daac6fce6c3115a22.zip cpython-31a252b7f3d4fd5af91d388daac6fce6c3115a22.tar.gz cpython-31a252b7f3d4fd5af91d388daac6fce6c3115a22.tar.bz2 | |
Issue #16915: Clarify that mode parameter of socket.makefile() does not accept
the same values as open().
Diffstat (limited to 'Lib/socket.py')
| -rw-r--r-- | Lib/socket.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/socket.py b/Lib/socket.py index ed1b10a..95ce9eb 100644 --- a/Lib/socket.py +++ b/Lib/socket.py @@ -209,10 +209,10 @@ class socket(_socket.socket): encoding=None, errors=None, newline=None): """makefile(...) -> an I/O stream connected to the socket - The arguments are as for io.open() after the filename, - except the only mode characters supported are 'r', 'w' and 'b'. - The semantics are similar too. (XXX refactor to share code?) + The arguments are as for io.open() after the filename, except the only + supported mode values are 'r' (default), 'w' and 'b'. """ + # XXX refactor to share code? if not set(mode) <= {"r", "w", "b"}: raise ValueError("invalid mode %r (only r, w, b allowed)" % (mode,)) writing = "w" in mode |
