Commit c523a815 authored by Ezio Melotti's avatar Ezio Melotti

#18267: merge with 3.3.

parents 09b724f6 0cf6ed9d
...@@ -439,14 +439,14 @@ A usage example of this class follows. The server code:: ...@@ -439,14 +439,14 @@ A usage example of this class follows. The server code::
from xmlrpc.server import SimpleXMLRPCServer from xmlrpc.server import SimpleXMLRPCServer
def add(x,y): def add(x, y):
return x+y return x + y
def subtract(x, y): def subtract(x, y):
return x-y return x - y
def multiply(x, y): def multiply(x, y):
return x*y return x * y
def divide(x, y): def divide(x, y):
return x // y return x // y
...@@ -467,13 +467,13 @@ The client code for the preceding server:: ...@@ -467,13 +467,13 @@ The client code for the preceding server::
proxy = xmlrpc.client.ServerProxy("http://localhost:8000/") proxy = xmlrpc.client.ServerProxy("http://localhost:8000/")
multicall = xmlrpc.client.MultiCall(proxy) multicall = xmlrpc.client.MultiCall(proxy)
multicall.add(7,3) multicall.add(7, 3)
multicall.subtract(7,3) multicall.subtract(7, 3)
multicall.multiply(7,3) multicall.multiply(7, 3)
multicall.divide(7,3) multicall.divide(7, 3)
result = multicall() result = multicall()
print("7+3=%d, 7-3=%d, 7*3=%d, 7/3=%d" % tuple(result)) print("7+3=%d, 7-3=%d, 7*3=%d, 7//3=%d" % tuple(result))
Convenience Functions Convenience Functions
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment