kopia lustrzana https://github.com/micropython/micropython-lib
uasyncio: Add __repr__() for StreamReader/StreamWriter.
rodzic
0a20a84f61
commit
a776b5086e
|
@ -211,6 +211,9 @@ class StreamReader:
|
||||||
log.debug("StreamReader.readline(): res: %s", res)
|
log.debug("StreamReader.readline(): res: %s", res)
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return "<StreamReader %r>" % self.s
|
||||||
|
|
||||||
|
|
||||||
class StreamWriter:
|
class StreamWriter:
|
||||||
|
|
||||||
|
@ -244,6 +247,9 @@ class StreamWriter:
|
||||||
yield IOWriteDone(self.s)
|
yield IOWriteDone(self.s)
|
||||||
self.s.close()
|
self.s.close()
|
||||||
|
|
||||||
|
def __repr__(self):
|
||||||
|
return "<StreamWriter %r>" % self.s
|
||||||
|
|
||||||
|
|
||||||
def open_connection(host, port):
|
def open_connection(host, port):
|
||||||
log.debug("open_connection(%s, %s)", host, port)
|
log.debug("open_connection(%s, %s)", host, port)
|
||||||
|
|
Ładowanie…
Reference in New Issue