Fix TypeError is asyncio/proactor_events (#993)
diff --git a/Lib/asyncio/proactor_events.py b/Lib/asyncio/proactor_events.py
index c85d4da..642f61e 100644
--- a/Lib/asyncio/proactor_events.py
+++ b/Lib/asyncio/proactor_events.py
@@ -227,8 +227,9 @@
def write(self, data):
if not isinstance(data, (bytes, bytearray, memoryview)):
- raise TypeError('data argument must be byte-ish (%r)',
- type(data))
+ msg = ("data argument must be a bytes-like object, not '%s'" %
+ type(data).__name__)
+ raise TypeError(msg)
if self._eof_written:
raise RuntimeError('write_eof() already called')