summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2013-08-08 12:46:13 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2013-08-08 12:46:13 (GMT)
commit3e4477ced0562557840583fe706cddb3752d09ce (patch)
tree93f6c84f4057c9668c48e3af592c7424333de19e /Doc
parent5cc06fde432e4a66aacac33d62947ad20f505c99 (diff)
parent79016e1d55ce5421a74c1a2a8a41088aefca0177 (diff)
downloadcpython-3e4477ced0562557840583fe706cddb3752d09ce.zip
cpython-3e4477ced0562557840583fe706cddb3752d09ce.tar.gz
cpython-3e4477ced0562557840583fe706cddb3752d09ce.tar.bz2
#18267: merge with 3.3.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/xmlrpc.client.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/Doc/library/xmlrpc.client.rst b/Doc/library/xmlrpc.client.rst
index a18a625..3cb19d1 100644
--- a/Doc/library/xmlrpc.client.rst
+++ b/Doc/library/xmlrpc.client.rst
@@ -439,14 +439,14 @@ A usage example of this class follows. The server code::
from xmlrpc.server import SimpleXMLRPCServer
- def add(x,y):
- return x+y
+ def add(x, y):
+ return x + y
def subtract(x, y):
- return x-y
+ return x - y
def multiply(x, y):
- return x*y
+ return x * y
def divide(x, y):
return x // y
@@ -467,13 +467,13 @@ The client code for the preceding server::
proxy = xmlrpc.client.ServerProxy("http://localhost:8000/")
multicall = xmlrpc.client.MultiCall(proxy)
- multicall.add(7,3)
- multicall.subtract(7,3)
- multicall.multiply(7,3)
- multicall.divide(7,3)
+ multicall.add(7, 3)
+ multicall.subtract(7, 3)
+ multicall.multiply(7, 3)
+ multicall.divide(7, 3)
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