Arguments of function as out
Piet van Oostrum
piet at cs.uu.nl
Wed Sep 3 09:43:47 EDT 2003
>>>>> "Birgit Rahm" <br_y at yahoo.de> (BR) wrote:
BR> Hallo Newsgroup,
BR> I have the following problem:
BR> I work with Python 2.2 and invoke functions via CORBA ( I use
BR> onmiORB/omniORBpy) on a server.
BR> The server provides me a function, where the 3 arguments are out-arguments
BR> and the return is void / None.
BR> How can I get these out arguments?
BR> I have read that every argument is seen as local to the function and
BR> can not be used as return value.
BR> (I can't redesign the server function.)
BR> Can I make the 3 arguments global before they were used in the function?
BR> Does this help me?
BR> Or what can I do?
This is described in the Python language binding:
Operations of an interface map to methods available on the object references.
Parameters with a parameter attribute of in or inout are passed from left to
right to the method, skipping out parameters. The return value of a method
depends on the number of out parameters and the return type. If the
operation returns a value, this value forms the first result value. All
inout or out parameters form consecutive result values. The method result
depends then on the number of result values:
* If there is no result value, the method returns None.
* If there is exactly one result value, it is returned as a single value.
* If there is more than one result value, all of them are packed into a
tuple, and this tuple is returned.
--
Piet van Oostrum <piet at cs.uu.nl>
URL: http://www.cs.uu.nl/~piet [PGP]
Private email: P.van.Oostrum at hccnet.nl
More information about the Python-list
mailing list