X Tutup
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Lib/asynchat.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ def handle_close(self):

def push(self, data):
if not isinstance(data, (bytes, bytearray, memoryview)):
raise TypeError('data argument must be byte-ish (%r)',
type(data))
raise TypeError('data argument must be a bytes-like object, not %r' %
type(data).__name__)
sabs = self.ac_out_buffer_size
if len(data) > sabs:
for i in range(0, len(data), sabs):
Expand Down
4 changes: 2 additions & 2 deletions Lib/asyncio/proactor_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,8 @@ class _ProactorBaseWritePipeTransport(_ProactorBasePipeTransport,

def write(self, data):
if not isinstance(data, (bytes, bytearray, memoryview)):
raise TypeError('data argument must be byte-ish (%r)',
type(data))
raise TypeError('data argument must be a bytes-like object, not %r' %
type(data).__name__)
if self._eof_written:
raise RuntimeError('write_eof() already called')

Expand Down
X Tutup