title: Python multiprocessing object reference
body: <p>I don't get python multiprocessing module.
  I start a process with the function and pass and object as its parameter. As I understand it, it should be the exact copy of that object. But if I try to print the address of that object it is the same in every process. How it is possible? Shouldn't address be different in every process? And if it is the same object in every process how come that changes to it are not global but local for every process?</p>
  
  <p>I have my object defined like this:</p>
  
  <pre><code>class MyClass():
  
      my_field = None
  
      def __init__():
          self.my_field = 0
  </code></pre>
  
  <p>And function which runs in separate process</p>
  
  <pre><code>def function_to_run_in_process(some_object):
      print some_object
  </code></pre>
  
  <p>The result for multiple processes is something like:</p>
  
  <pre><code>&lt;__main__.MyClass instance at 0x7f276419e5f0&gt;
  &lt;__main__.MyClass instance at 0x7f276419e5f0&gt;
  &lt;__main__.MyClass instance at 0x7f276419e5f0&gt;
  </code></pre>
  
  <p>and so on.</p>
  
  <p>If I tried to change some field of the object inside the process like this:</p>
  
  <pre><code>def function_to_run_in_process(some_object, process_lock):
     process_lock.acquire()
     some_object.some_field = some_object.some_field + 1
     process_lock.acquire()
     print some_object, 'with some_field = ', some_object.some_field, 'at address: ', hex(id(some_object.some_field))
  </code></pre>
  
  <p>I get the result similar to this:</p>
  
  <pre><code>&lt;__main__.MyClass instance at 0x7f276419e5f0&gt;  with some_field = 1  at address  0xc5c428&gt;
  &lt;__main__.MyClass instance at 0x7f276419e5f0&gt;  with some_field = 1  at address  0xc5c428&gt;
  &lt;__main__.MyClass instance at 0x7f276419e5f0&gt;  with some_field = 1  at address  0xc5c428&gt;
  </code></pre>
  
  <p>So, if the passed object is just a copy, why there are same addresses not only for the object, but even for its field? And if they are the same why the change to the field is not visible ?</p>