Skip to content

Commit 2a5d6b8

Browse files
committed
uasyncio: Add __repr__() for StreamReader/StreamWriter.
1 parent 67b7135 commit 2a5d6b8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

uasyncio/uasyncio.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,9 @@ def readline(self):
211211
log.debug("StreamReader.readline(): res: %s", res)
212212
return res
213213

214+
def __repr__(self):
215+
return "<StreamReader %r>" % self.s
216+
214217

215218
class StreamWriter:
216219

@@ -244,6 +247,9 @@ def close(self):
244247
yield IOWriteDone(self.s)
245248
self.s.close()
246249

250+
def __repr__(self):
251+
return "<StreamWriter %r>" % self.s
252+
247253

248254
def open_connection(host, port):
249255
log.debug("open_connection(%s, %s)", host, port)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy