Commit b0e16c71 authored by Guido van Rossum's avatar Guido van Rossum

Define __str__ as an alias for __repr__. Otherwise __str__ will get

the socket's __str__ due to a __getattr__ method in asyncore's
dispatcher base class that everybody hates but nobody dares take away.
parent bb4a24c5
......@@ -145,6 +145,8 @@ class Connection(smac.SizedMessageAsyncConnection):
def __repr__(self):
return "<%s %s>" % (self.__class__.__name__, self.addr)
__str__ = __repr__ # Defeat asyncore's dreaded __getattr__
def close(self):
if self.closed:
return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment