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:
parent
c743c8d166
commit
5ebca871d9
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user