summaryrefslogtreecommitdiffstats
path: root/Lib/xmlrpc/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/xmlrpc/client.py')
-rw-r--r--Lib/xmlrpc/client.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/xmlrpc/client.py b/Lib/xmlrpc/client.py
index c2ae707..d46f32c 100644
--- a/Lib/xmlrpc/client.py
+++ b/Lib/xmlrpc/client.py
@@ -354,7 +354,7 @@ class DateTime:
return self.value
def __repr__(self):
- return "<DateTime %r at %x>" % (self.value, id(self))
+ return "<DateTime %r at %#x>" % (self.value, id(self))
def decode(self, data):
self.value = str(data).strip()
@@ -846,7 +846,7 @@ class MultiCall:
self.__call_list = []
def __repr__(self):
- return "<MultiCall at %x>" % id(self)
+ return "<MultiCall at %#x>" % id(self)
__str__ = __repr__
@@ -1449,6 +1449,12 @@ class ServerProxy:
return self.__transport
raise AttributeError("Attribute %r not found" % (attr,))
+ def __enter__(self):
+ return self
+
+ def __exit__(self, *args):
+ self.__close()
+
# compatibility
Server = ServerProxy