summaryrefslogtreecommitdiffstats
path: root/Lib/socket.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-02-18 15:34:00 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-02-18 15:34:00 (GMT)
commit3fe64d0c5ca5f1dc9723b9ef436d033f390b19f0 (patch)
treeb9ed163be92fd25abc23550f9c052447b1a8a804 /Lib/socket.py
parentc12fef9aa3282144dba83e0cd543bb510de6a745 (diff)
downloadcpython-3fe64d0c5ca5f1dc9723b9ef436d033f390b19f0.zip
cpython-3fe64d0c5ca5f1dc9723b9ef436d033f390b19f0.tar.gz
cpython-3fe64d0c5ca5f1dc9723b9ef436d033f390b19f0.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.py6
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