[Python-checkins] CVS: python/dist/src/Lib asyncore.py,1.21,1.22

Martin v. L?wis loewis@users.sourceforge.net
2001年10月12日 15:39:22 -0700


Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv8803
Modified Files:
	asyncore.py 
Log Message:
Correct __repr__: include module name, avoid extra space for empty status,
use 0x format for id. Proposed by Cesar Eduardo Barros in patch #470680.
Index: asyncore.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/asyncore.py,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** asyncore.py	2001年10月09日 10:10:33	1.21
--- asyncore.py	2001年10月12日 22:39:20	1.22
***************
*** 210,214 ****
 def __repr__ (self):
 try:
! status = []
 if self.accepting and self.addr:
 status.append ('listening')
--- 210,214 ----
 def __repr__ (self):
 try:
! status = [self.__class__.__module__+"."+self.__class__.__name__]
 if self.accepting and self.addr:
 status.append ('listening')
***************
*** 220,225 ****
 else:
 status.append (self.addr)
! return '<%s %s at %x>' % (self.__class__.__name__,
! ' '.join (status), id (self))
 except:
 pass
--- 220,224 ----
 else:
 status.append (self.addr)
! return '<%s at %#x>' % (' '.join (status), id (self))
 except:
 pass

AltStyle によって変換されたページ (->オリジナル) /