diff options
author | Georg Brandl <georg@python.org> | 2010-01-30 17:54:04 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-01-30 17:54:04 (GMT) |
commit | 167543c701ba6928ffcf7ea228143e6917beb501 (patch) | |
tree | 859c599c83dcff6df9462e961bcbac8993b18baa /Doc/library/xmlrpc.server.rst | |
parent | ea30c6f5ee59f1271498e6c6f0a60eebfc553b32 (diff) | |
download | cpython-167543c701ba6928ffcf7ea228143e6917beb501.zip cpython-167543c701ba6928ffcf7ea228143e6917beb501.tar.gz cpython-167543c701ba6928ffcf7ea228143e6917beb501.tar.bz2 |
#7814: fix wrong example function usage.
Diffstat (limited to 'Doc/library/xmlrpc.server.rst')
-rw-r--r-- | Doc/library/xmlrpc.server.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/xmlrpc.server.rst b/Doc/library/xmlrpc.server.rst index 4a391b7..3cb2c3a 100644 --- a/Doc/library/xmlrpc.server.rst +++ b/Doc/library/xmlrpc.server.rst @@ -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() |