[omniORB] how to pass python list through CORBA IDL?

Duncan Grisby duncan at grisby.org
Thu Jan 8 10:48:41 GMT 2009


On Wednesday 7 January, "Deepan N Seeralan" wrote:

[...]
> My objective is to pass a sequence (i.e list) to the server method and modify
> the list from there. I suppose python lists are passed by reference by
> default. The changes that I am doing to the list within the server method
> should be reflected on the client without actually returning the list. But
> when I tried it did not happen that way. I had to return the list to the
> client to update the list on its side. I am not sure whether this is the
> expected behavior or am i doing something wrong here. Could anyone please help
> me here?

It is expected. The Python language mapping says that out and inout
arguments have their values returned as extra return values. The fact
that in your case the inout argument happens to be a mutable Python type
doesn't change that. Plenty of other things you can declare as inout are
not mutable when mapped to Python.

The Python language mapping is here:

  http://www.omg.org/technology/documents/formal/python.htm

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan at grisby.org     --
   -- http://www.grisby.org --



More information about the omniORB-list mailing list