[Tutor] Variables of Variables

Danny Yoo dyoo at hkn.eecs.berkeley.edu
Fri Jan 19 00:20:03 CET 2007

> Rather than storing your data as variables, you could store it in a 
> dictionary.  Then you can dynamically access data however you like..

Suggesting a dictionary here is right.

The technique in the original poster's question is deprecated and widely 
known to be a Bad Idea in Perl.  See Mark Jason Dominus's "Why it's stupid 
to use a variable as a variable name':


So trying to simulate soft references in Python is damaging: we should do 
what we can to keep the idea from propagating.  *grin*

More information about the Tutor mailing list