title: Python: references to dict values
body: <p>I need to parse a dictionary and replace placeholder keys with other values.
  The dictionary is nested, the placeholder can appear multiple times and at different depths.</p>
  
  <p>Therefore I have written a recursive function which traverses the dict and creates a list of values that belong to keys which are equal to the placeholder.</p>
  
  <p>With this list, I would like to replace the values.
  This needs reference semantics. It doesn't work:</p>
  
  <pre><code>old={"token":4}
  reference=old["token"]
  reference=5
  print(old["token"]==5)    #False
  
  old={"token":4}
  references=[]
  references.append(old["token"])
  references[0]=5
  print(old["token"]==5)   #False
  </code></pre>
  
  <p>How can I create references to dictionary entries ?</p>