title: Python prevent copying object as reference
body: <p>Is it possible to copy an object in Python without copying a reference?</p>
  
  <p>For example, if I define a class</p>
  
  <pre><code>class SomeClass:
      def __init__(self):
          self.value = 0
  </code></pre>
  
  <p>and then create an instance</p>
  
  <pre><code>someObject = SomeClass()
  someObject.value = 12
  </code></pre>
  
  <p>and I try to copy it to another instance:</p>
  
  <pre><code>anotherObject = someObject
  </code></pre>
  
  <p>and try to modify a property,</p>
  
  <pre><code>anotherObject.value = 10
  </code></pre>
  
  <p>the original property gets modified:</p>
  
  <pre><code>print someObject.value #prints 10
  </code></pre>
  
  <p>Is there any way to prevent this from happening? To clarify, I want the <code>anotherObject.value</code> to contain <code>10</code>, but I want <code>someObject.value</code> to still contain the original <code>12</code>. Is this possible in python?</p>
  
  <p>Thanks in advance.</p>