title: Python: deepcopy does not work on user-defined classes?
body: <p>In the following example I would expect deepcopy to create a copy of field and not just copy the reference. What happens here and is there an easy way around it?</p>
  
  <pre><code>from copy import deepcopy
  
  class Test:
      field = [(1,2)]
  
  t1 = Test()
  t2 = deepcopy(t1)
  
  t2.field[0]=(5,10)
  
  print t1.field # [(1,2)] expected but [(5,10)] obtained
  print t2.field # [(5,10)] expected
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>[(5, 10)]
  [(5, 10)]
  </code></pre>