Problem with inheritance and "self" reference
<p>This is my first post, so first of all I want to say a giant "Thank you!" to the community of stackoverflow for all the time an answer did the trick for me :)</p>

<p>I have a problem while dealing with python's inheritance.</p>

<p>I have a parent class which contains the following code:</p>

<pre><code>def start(self):

  pid = os.fork()

  if (pid==0):
   self.__do_in_forked_process()
  elif(pid &gt; 0):
   self.__do_in_parent_process()
  else:
   print ("Error while forking...")
   sys.exit(1)
</code></pre>

<p>The __do_in_forked_process() method contains a method <code>self.__manage_request()</code> which is defined in the parent class and overridden in the child class.</p>

<p>In the child class, when I use use the method <code>self.start()</code> the problem arise: the self.__manage_request() method executed is the one defined in the parent class instead of the method define in the child class (even if, I suppose, when I do self.start() the start method and all the things inside it should refer to the child object instead of to the parent object).</p>

<p>Thanks in advance!</p>

<p>turkishweb</p>
