Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
167543c7
Commit
167543c7
authored
Jan 30, 2010
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#7814: fix wrong example function usage.
parent
ea30c6f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
Doc/library/xmlrpc.server.rst
Doc/library/xmlrpc.server.rst
+5
-4
No files found.
Doc/library/xmlrpc.server.rst
View file @
167543c7
...
...
@@ -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()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment