title: Accessing private methods from inherited class in python
body: <p>I want to follow good programming practice, so i am kind of stuck at this questions:</p>
  
  <p>Lets say i have Class root,</p>
  
  <pre><code>Class root(Object):
     def __init__(self):
       self._root_tree = 'Base'
  
     def __str__(self):
       return self._root_tree
  
     def _test(self):
        return 'test'
  </code></pre>
  
  <p>lets say i create a class called Oak</p>
  
  <pre><code>Class Oak(root):
      def __str__(self):
        return 'Oak'
      def _test(self):
        return 'Oak_test'
      def _new_fun(self):
        return 'new_func_only_in_oak'
  </code></pre>
  
  <p>Then in Class Cherry, can i do the following</p>
  
  <pre><code>Class Cherry(root):
      def _grab_trees(self,another_tree): #another_tree is a Oak object
        other_tree = another_tree.__str__() #this will return Oak
        return 'The other three is: ' + other_tree
      def _test2(self,another_tree):
        return another_tree._test()
      def _testing_new(self,another_tree):
        return another_tree._new_fun()
  </code></pre>
  
  <p>Basically calling <code>__str__()</code> <code>_new_fun()</code> and <code>_test()</code> in the Cherry class valid (good practice).</p>