title: Referencing and setting variables in Python dicts
body: <p>I want to use a python dict to store variable references and be able to assign the values pointed out by those references.</p>
  
  <pre><code>foo = "foo"
  d = {'foo' : foo}
  d['foo'] = "bar"
  foo
  // output: 'foo', but I want it to be 'bar'.
  </code></pre>
  
  <p>How can I accomplish this?</p>
  
  <p>Edit:
  Some actual code. </p>
  
  <pre><code>settings = values["settings"] // This is a dict, such as {"metoder_alphasort" : "on"}
  field_map = {"metoder_alphasort" : profile.metoder_alphasort}
  for setting in field_map.keys():
      if settings.has_key(setting):
          if settings[setting] == 'on':
              field_map[setting] = True
  # field_map[setting] is now True, but profile.metoder_alphasort is False
  </code></pre>