title: Access the private attributes in a inherited class in python
body: <p>I have a class <code>a</code> defined like this:</p>
  <pre><code>class a:
      def __init__(self, w, x, y, z):
          self.w = w
          self.x = x
          self.y = y
          self.__z = z
  </code></pre>
  <p>I also have another class <code>b</code> which inherits <code>a</code> defined like this:</p>
  <pre><code>class b(a):
      def __init__(self, w, x, y, z, t):
          super().__init__(w, x, y, z)
          self.__t = t
  </code></pre>
  <p>Now if I had access <code>w, x, y</code> from within <code>b</code>, I could simply do:</p>
  <pre><code>self.w
  self.x
  self.y
  </code></pre>
  <p>But I can't do <code>self.z</code> or <code>self.__z</code> to access <code>z</code>. So my question is how can you access dunder values such as <code>z</code> from within class <code>b</code></p>
  <p>(I know python doesn't really have private variables and I could do <code>self._a__z</code> from within class <code>b</code> to access <code>z</code> but I'm looking for methods which would allow me to just do something like <code>self.z</code> to access <code>z</code> from inside <code>b</code>)</p>