[Zodb-checkins] CVS: ZODB3/ZEO/zrpc - connection.py:1.30

Guido van Rossum guido@python.org
Wed, 18 Sep 2002 23:25:59 -0400


Update of /cvs-repository/ZODB3/ZEO/zrpc
In directory cvs.zope.org:/tmp/cvs-serv14040

Modified Files:
	connection.py 
Log Message:
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.


=== ZODB3/ZEO/zrpc/connection.py 1.29 => 1.30 ===
--- ZODB3/ZEO/zrpc/connection.py:1.29	Tue Sep 17 17:17:55 2002
+++ ZODB3/ZEO/zrpc/connection.py	Wed Sep 18 23:25:59 2002
@@ -145,6 +145,8 @@
     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