Get parameter by name

Oleg Broytmann phd at phd.russ.ru
Sat Nov 6 14:39:21 CET 1999


On 6 Nov 1999, Michael Hudson wrote:
> locals() should do the trick:
> 
> def f(x):
>     return locals()["x"]

   Thanks!

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