summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-05-06 19:29:40 (GMT)
committerGitHub <noreply@github.com>2019-05-06 19:29:40 (GMT)
commit96aeaec64738b730c719562125070a52ed570210 (patch)
treed68994f93014d081e9a441e7bf7dfda3aaadd402 /Lib/xmlrpc
parent964663089547ca110199e23867b46b07ff4be88c (diff)
downloadcpython-96aeaec64738b730c719562125070a52ed570210.zip
cpython-96aeaec64738b730c719562125070a52ed570210.tar.gz
cpython-96aeaec64738b730c719562125070a52ed570210.tar.bz2
bpo-36793: Remove unneeded __str__ definitions. (GH-13081)
Classes that define __str__ the same as __repr__ can just inherit it from object.
Diffstat (limited to 'Lib/xmlrpc')
-rw-r--r--Lib/xmlrpc/client.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
index a0e923a..b987574 100644
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -186,8 +186,7 @@ INTERNAL_ERROR = -32603
class Error(Exception):
"""Base class for client errors."""
- def __str__(self):
- return repr(self)
+ __str__ = object.__str__
##
# Indicates an HTTP-level protocol error. This is raised by the HTTP
@@ -869,8 +868,6 @@ class MultiCall:
def __repr__(self):
return "<%s at %#x>" % (self.__class__.__name__, id(self))
- __str__ = __repr__
-
def __getattr__(self, name):
return _MultiCallMethod(self.__call_list, name)
@@ -1468,8 +1465,6 @@ class ServerProxy:
(self.__class__.__name__, self.__host, self.__handler)
)
- __str__ = __repr__
-
def __getattr__(self, name):
# magic method dispatcher
return _Method(self.__request, name)