0
0
mirror of https://github.com/python/cpython.git synced 2024-11-30 18:51:15 +01:00

Allow makefile('rb') or 'wb'.

This commit is contained in:
Jack Jansen 1996-02-14 16:03:14 +00:00
parent c743c8d166
commit 5ebca871d9

View File

@ -216,6 +216,7 @@ class _udpsocket(_socket):
class _socketfile:
def __init__(self, sock, rw, bs):
if rw[1:] == 'b': rw = rw[:1]
if rw not in ('r', 'w'): raise _myerror, "mode must be 'r' or 'w'"
self.sock = sock
self.rw = rw