Get parameter by name
phd at phd.russ.ru
Sat Nov 6 16:32:30 CET 1999
On Sat, 6 Nov 1999, Thomas A. Bryan wrote:
> I'm not sure whether I understand the question. Is this what you're
> trying to figure out?
> >>> ka = 1
> >>> x = 'ka'
> >>> eval(x)
> >>> y = eval(x)
> >>> y
> If not, please repost.
Yes, but it is better to use locals() or vars() function for this...
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