title: How to exclude specific references from deepcopy?
body: <p>I have object which has it's own content (i.e. list of something) and a reference to another object, with which it is linked. How can I exclude the reference to the other object from being deep-copied?</p>
  
  <pre><code>from copy import deepcopy
  class Foo:
      def __init__(self, content, linked_to):
          self.content = content
          self.linked_to = linked_to
  
  a1 = Foo([[1,2],[3,4]], None)
  a2 = Foo([[5,6],[7,8]], a1)
  
  a3 = deepcopy(a2) # &lt;- I don't want there, that a3.linked_to will be copied
  # I want that a3.linked_to will still point to a1
  
  a3.linked_to.content.append([9,10])
  print a1.content # [[1,2],[3,4]], but I want [[1,2],[3,4], [9,10]] 
  </code></pre>