summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc/client.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-07-25 20:36:00 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-07-25 20:36:00 (GMT)
commit465e60e654732b3a0b726d1fd82950fc982fcba2 (patch)
tree25a1567d99855ff0a2ffcdc1f7c7659f85aaaa0b /Lib/xmlrpc/client.py
parent54701f303fdde38c53811776ba2d16fabf219dcc (diff)
downloadcpython-465e60e654732b3a0b726d1fd82950fc982fcba2.zip
cpython-465e60e654732b3a0b726d1fd82950fc982fcba2.tar.gz
cpython-465e60e654732b3a0b726d1fd82950fc982fcba2.tar.bz2
Issue #22033: Reprs of most Python implemened classes now contain actual
class name instead of hardcoded one.
Diffstat (limited to 'Lib/xmlrpc/client.py')
-rw-r--r--Lib/xmlrpc/client.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
index d46f32c..3a1435d 100644
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -207,8 +207,8 @@ class ProtocolError(Error):
self.headers = headers
def __repr__(self):
return (
- "<ProtocolError for %s: %s %s>" %
- (self.url, self.errcode, self.errmsg)
+ "<%s for %s: %s %s>" %
+ (self.__class__.__name__, self.url, self.errcode, self.errmsg)
)
##
@@ -236,7 +236,8 @@ class Fault(Error):
self.faultCode = faultCode
self.faultString = faultString
def __repr__(self):
- return "<Fault %s: %r>" % (self.faultCode, self.faultString)
+ return "<%s %s: %r>" % (self.__class__.__name__,
+ self.faultCode, self.faultString)
# --------------------------------------------------------------------
# Special values
@@ -354,7 +355,7 @@ class DateTime:
return self.value
def __repr__(self):
- return "<DateTime %r at %#x>" % (self.value, id(self))
+ return "<%s %r at %#x>" % (self.__class__.__name__, self.value, id(self))
def decode(self, data):
self.value = str(data).strip()
@@ -846,7 +847,7 @@ class MultiCall:
self.__call_list = []
def __repr__(self):
- return "<MultiCall at %#x>" % id(self)
+ return "<%s at %#x>" % (self.__class__.__name__, id(self))
__str__ = __repr__
@@ -1426,8 +1427,8 @@ class ServerProxy:
def __repr__(self):
return (
- "<ServerProxy for %s%s>" %
- (self.__host, self.__handler)
+ "<%s for %s%s>" %
+ (self.__class__.__name__, self.__host, self.__handler)
)
__str__ = __repr__