Tom Anderson wrote: > On Mon, 13 Jun 2005, Ali Razavi wrote: > >> Is there any reflective facility in python that I can use to define a >> variable with a name stored in another variable ? >> >> like I have : >> x = "myVarName" >> >> what can I do to declare a new variable with the name of the string >> stored in x. And how can I access that implicitly later ? > > > Are you absolutely sure you want to do this? > > tom > Have you ever heard of meta programming ? I guess if you had, it wouldn't seem this odd to you. -- http://mail.python.org/mailman/listinfo/python-list
- Re: implicit variable declaration and access Ali Razavi
- Re: implicit variable declaration and access Cameron Laird
- Re: implicit variable declaration and access Tom Anderson
- Re: implicit variable declaration and access Scott David Daniels
- Re: implicit variable declaration and acc... Tom Anderson
- Re: implicit variable declaration and access Tom Anderson
- Re: implicit variable declaration and access Steven D'Aprano
- Re: implicit variable declaration and access Ali Razavi
- Re: implicit variable declaration and access Cameron Laird
- Re: implicit variable declaration and access Christopher Subich
- Re: implicit variable declaration and acc... Cameron Laird