Converting a tuple to an argument list for a method?

Emile van Sebille emile at fenx.com
Thu Oct 18 07:34:07 EDT 2001


"Gabriel Ambuehl" <gabriel_ambuehl at buz.ch> wrote in message
news:mailman.1003398391.16015.python-list at python.org...
> -----BEGIN PGP SIGNED MESSAGE-----
>
> Hello,
> I'm messing with the XMLRPC implementation from PythonWare which
> makes the arguments to the request available as tuple but the
> method's
> I want to call expect a normal argument list as their parameters.
>
> So xmlprc delivers:
> xmlrpcparam=(param1, param2, param....)
> which won't work for
> method(param1, param2, param3)
> because the tuple only counts as one argument. So is there a
> possibility to use the tuple (which hasn't got a fixed length cause
> different methods on the server need different numbers of arguments,
> else it would be easy to just do
> method(xmlrpcparam[0], xmlrpcmethod[1])) to form an argument list for
> the methods on the server?

does method(*xmlrpcparam) do it for you?


--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list