Get parameter by name

Oleg Broytmann phd at phd.russ.ru
Sat Nov 6 07:17:34 EST 1999


Hello!

   I have a function with a long list of arguments:

def f(a1, a2, a3, b1, b2, b3, td, sd, si, ka, num=0, date=None):
   ...body_here...

and I have a list of strings "a1, td, ka". How can I get the value of
corresponding args? E.g., if I have

   x = "ka"

how can I get the value of parameter, the name of which is in x ("ka", in
this case)?

Oleg.
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list