summaryrefslogtreecommitdiffstats
path: root/Lib/asyncore.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2001-10-12 22:39:20 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2001-10-12 22:39:20 (GMT)
commit106bdd3b805ddc8dc30145f4e460cb9eaf044707 (patch)
treef608048e7a574162d3c8c8e0e57cb4e9c6d34b97 /Lib/asyncore.py
parent9abaf4d3b78d756e4c0e30b7accb70e531dd9085 (diff)
downloadcpython-106bdd3b805ddc8dc30145f4e460cb9eaf044707.zip
cpython-106bdd3b805ddc8dc30145f4e460cb9eaf044707.tar.gz
cpython-106bdd3b805ddc8dc30145f4e460cb9eaf044707.tar.bz2
Correct __repr__: include module name, avoid extra space for empty status,
use 0x format for id. Proposed by Cesar Eduardo Barros in patch #470680.
Diffstat (limited to 'Lib/asyncore.py')
-rw-r--r--Lib/asyncore.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/asyncore.py b/Lib/asyncore.py
index 00b02e3..84f8a11 100644
--- a/Lib/asyncore.py
+++ b/Lib/asyncore.py
@@ -209,7 +209,7 @@ class dispatcher:
def __repr__ (self):
try:
- status = []
+ status = [self.__class__.__module__+"."+self.__class__.__name__]
if self.accepting and self.addr:
status.append ('listening')
elif self.connected:
@@ -219,8 +219,7 @@ class dispatcher:
status.append ('%s:%d' % self.addr)
else:
status.append (self.addr)
- return '<%s %s at %x>' % (self.__class__.__name__,
- ' '.join (status), id (self))
+ return '<%s at %#x>' % (' '.join (status), id (self))
except:
pass