title: Inheritance of private and protected methods in Python
body: <p>I know, there are no 'real' private/protected methods in Python. This approach isn't meant to hide anything; I just want to understand what Python does.</p>
  
  <pre class="lang-py prettyprint-override"><code>class Parent(object):
      def _protected(self):
          pass
  
      def __private(self):
          pass
  
  class Child(Parent):
      def foo(self):
          self._protected()   # This works
  
      def bar(self):
          self.__private()    # This doesn't work, I get a AttributeError:
                              # 'Child' object has no attribute '_Child__private'
  </code></pre>
  
  <p>So, does this behaviour mean, that 'protected' methods will be inherited but 'private' won't at all? <br>
  Or did I miss anything?</p>