title: Python equivalent of pointers
body: <p>In python everything works by reference:</p>
  
  <pre><code>&gt;&gt;&gt; a = 1
  &gt;&gt;&gt; d = {'a':a}
  &gt;&gt;&gt; d['a']
  1
  &gt;&gt;&gt; a = 2
  &gt;&gt;&gt; d['a']
  1
  </code></pre>
  
  <p>I want something like this</p>
  
  <pre><code>&gt;&gt;&gt; a = 1
  &gt;&gt;&gt; d = {'a':magical pointer to a}
  &gt;&gt;&gt; d['a']
  1
  &gt;&gt;&gt; a = 2
  &gt;&gt;&gt; d['a']
  2
  </code></pre>
  
  <p>What would you substitute for <em>magical pointer to a</em> so that python would output what I want.</p>
  
  <p>I would appreciate general solutions (not just for the above dictionary example with independent variables, but something that would work for other collections and class/instance variables)</p>