Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 167543c

Browse files
committed
#7814: fix wrong example function usage.
1 parent ea30c6f commit 167543c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Doc/library/xmlrpc.server.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ Server code::
136136
server.register_function(adder_function, 'add')
137137

138138
# Register an instance; all the methods of the instance are
139-
# published as XML-RPC methods (in this case, just 'div').
139+
# published as XML-RPC methods (in this case, just 'mul').
140140
class MyFuncs:
141-
def div(self, x, y):
142-
return x // y
141+
def mul(self, x, y):
142+
return x * y
143143

144144
server.register_instance(MyFuncs())
145145

@@ -209,7 +209,8 @@ requests sent to Python CGI scripts.
209209
Example::
210210

211211
class MyFuncs:
212-
def div(self, x, y) : return x // y
212+
def mul(self, x, y):
213+
return x * y
213214

214215

215216
handler = CGIXMLRPCRequestHandler()

0 commit comments

Comments
 (0)