title: parent class self.__class__.__name__ prints name of child class
body: <p>I have 2 classes: a and b. 'b' inherits from 'a'. How do i get class 'a' to print it's actual name? In the case below, it prints the name of the child class.  </p>
  
  <pre><code>class a():
      def __init__(self):
          print("a -&gt; " + self.__class__.__name__)
  
  class b(a):
      def __init__(self):
          super().__init__()
          print("b -&gt; " + self.__class__.__name__)
  
  bo = b()
  </code></pre>
  
  <p>prints:</p>
  
  <pre><code>a -&gt; b
  b -&gt; b
  </code></pre>