Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Doc/library/xmlrpc.client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
--------------

XML-RPC is a Remote Procedure Call method that uses XML passed via HTTP(S) as a
transport. With it, a client can call methods with parameters on a remote
transport. With it, a client can call methods with arguments on a remote
server (the server is named by a URI) and get back structured data. This module
supports writing XML-RPC client code; it handles all the details of translating
between conformable Python objects and XML on the wire.
Expand Down Expand Up @@ -195,7 +195,7 @@ grouped under the reserved :attr:`~ServerProxy.system` attribute:

.. method:: ServerProxy.system.methodSignature(name)

This method takes one parameter, the name of a method implemented by the XML-RPC
This method takes one argument, the name of a method implemented by the XML-RPC
server. It returns an array of possible signatures for this method. A signature
is an array of types. The first of these types is the return type of the method,
the rest are parameters.
Expand All @@ -204,7 +204,7 @@ grouped under the reserved :attr:`~ServerProxy.system` attribute:
a list of signatures rather than a singleton.

Signatures themselves are restricted to the top level parameters expected by a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would write something like "Note that a signature does not give details of a complex type; it just gives the basic XML-RPC type -- array or structure." (see https://xmlrpc-c.sourceforge.io/introspection.html).

This is applied not only to the types of parameters, but to the return type too.

method. For instance if a method expects one array of structs as a parameter,
method. For instance if a method expects one array of structs as a argument,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
method. For instance if a method expects one array of structs as a argument,
method. For instance if a method expects one array of structs as an argument,

and it returns a string, its signature is simply "string, array". If it expects
three integers and returns a string, its signature is "string, int, int, int".
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is applied to the return type too, I suggest to use this in the example.

Suggested change
three integers and returns a string, its signature is "string, int, int, int".
three integers and returns an array of strings, its signature is "array, int, int, int".

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’ve made the changes you suggested. The section now makes it clear that a signature only shows the top-level XML-RPC type (array or structure) for arguments and return values. Added a couple of examples to make it easier to understand


Expand All @@ -215,7 +215,7 @@ grouped under the reserved :attr:`~ServerProxy.system` attribute:

.. method:: ServerProxy.system.methodHelp(name)

This method takes one parameter, the name of a method implemented by the XML-RPC
This method takes one argument, the name of a method implemented by the XML-RPC
server. It returns a documentation string describing the use of that method. If
no such string is available, an empty string is returned. The documentation
string may contain HTML markup.
Expand Down Expand Up @@ -472,7 +472,7 @@ remote server into a single request [#]_.

Create an object used to boxcar method calls. *server* is the eventual target of
the call. Calls can be made to the result object, but they will immediately
return ``None``, and only store the call name and parameters in the
return ``None``, and only store the call name and arguments in the
:class:`MultiCall` object. Calling the object itself causes all stored calls to
be transmitted as a single ``system.multicall`` request. The result of this call
is a :term:`generator`; iterating over this generator yields the individual
Expand Down
Loading