]> granicus.if.org Git - python/commitdiff
#7814: fix wrong example function usage.
authorGeorg Brandl <georg@python.org>
Sat, 30 Jan 2010 17:54:04 +0000 (17:54 +0000)
committerGeorg Brandl <georg@python.org>
Sat, 30 Jan 2010 17:54:04 +0000 (17:54 +0000)
Doc/library/xmlrpc.server.rst

index 4a391b765cf5d854cd8672182f936d7ff28768d3..3cb2c3aaa15f91d827a3dcd751a51f987c12fb18 100644 (file)
@@ -136,10 +136,10 @@ Server code::
    server.register_function(adder_function, 'add')
 
    # Register an instance; all the methods of the instance are
-   # published as XML-RPC methods (in this case, just 'div').
+   # published as XML-RPC methods (in this case, just 'mul').
    class MyFuncs:
-       def div(self, x, y):
-           return x // y
+       def mul(self, x, y):
+           return x * y
 
    server.register_instance(MyFuncs())
 
@@ -209,7 +209,8 @@ requests sent to Python CGI scripts.
 Example::
 
    class MyFuncs:
-       def div(self, x, y) : return x // y
+       def mul(self, x, y):
+           return x * y
 
 
    handler = CGIXMLRPCRequestHandler()