]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#18267: make whitespace consistent and fix an operator.
authorEzio Melotti <ezio.melotti@gmail.com>
Thu, 8 Aug 2013 12:45:56 +0000 (15:45 +0300)
committerEzio Melotti <ezio.melotti@gmail.com>
Thu, 8 Aug 2013 12:45:56 +0000 (15:45 +0300)
Doc/library/xmlrpc.client.rst

index a18a625f7310fd769e4d188f91f797850d256a7e..3cb19d186267b1593f3483b200b24d1f8d945d86 100644 (file)
@@ -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