Despite the natural name space mapping, the goal to make language bindings
as natural as possible led to some variation for Python method signatures.
While the method name is used directly -- where the full name
(i.e., the short name with the extension appended) is used for overloaded
methods -- there are some differences for its
arguments. Specifically, arguments to the method include only the specified
in and inout arguments, while the return
value of the Python method includes the SIDL
return value in addition to the inout and out parameters.
(This will, hopefully, seem natural to Python programmers.)
For example, the following SIDL declaration for method passeverywhere
of class Cdouble within the Args package is
double passeverywhere( in double d1, out double d2, inout double d3 );
The corresponding calling signature -- based on Python's built-in
documentation capability -- is
passeverywhere(in double d1, inout double d3) RETURNS (double _return, out double d2, inout double d3)
Whenever the SIDL specification includes a return type, the corresponding Python signature will include an _return as the first value of the Python's RETURNS value. Starting _return with an underbar is used to indicate the argument is not a parameter since Python parameter names cannot begin with an underbar. More information on Python's built-in documentation capability is given in Subsection 11.3.4.
NOTE
As discussed in Subsection 11.2.3, methods passing raw SIDL
arrays (or r-arrays) do not have index arguments in Python.