Re: Variable by label

2008-05-16 Thread rocco . rossi
On May 16, 4:27 pm, "inhahe" <[EMAIL PROTECTED]> wrote: > >>> a = 1 > >>> b = eval("a") > >>> b > 1 > >>> a =1 > >>> b = globals()["a"] > >>> b > 1 > >>> a =1 > >>> b = locals()["a"] > >>> b > > 1<[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > Is there any function which will

Re: Variable by label

2008-05-16 Thread inhahe
>>> a = 1 >>> b = eval("a") >>> b 1 >>> a =1 >>> b = globals()["a"] >>> b 1 >>> a =1 >>> b = locals()["a"] >>> b 1 <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Is there any function which will return a variable by passing to it > the string containing the variable's name? Somethin

Re: Variable by label

2008-05-16 Thread Jarek Zgoda
[EMAIL PROTECTED] pisze: > Is there any function which will return a variable by passing to it > the string containing the variable's name? Something like this for > instance: > > foo = some_function("foo") > > or perhaps it's a dictionary. I don't know, but I would really like to > find out how

Re: Variable by label

2008-05-16 Thread Duncan Booth
[EMAIL PROTECTED] wrote: > Is there any function which will return a variable by passing to it > the string containing the variable's name? Something like this for > instance: > > foo = some_function("foo") > > or perhaps it's a dictionary. I don't know, but I would really like to > find out how

Re: Variable by label

2008-05-16 Thread Arnaud Delobelle
[EMAIL PROTECTED] wrote: > Is there any function which will return a variable by passing to it > the string containing the variable's name? Something like this for > instance: > > foo = some_function("foo") > > or perhaps it's a dictionary. I don't know, but I would really like to > find out how

Variable by label

2008-05-16 Thread rocco . rossi
Is there any function which will return a variable by passing to it the string containing the variable's name? Something like this for instance: foo = some_function("foo") or perhaps it's a dictionary. I don't know, but I would really like to find out how it can be done. I guess it is achievable.