title: Why doesn't super().__class__.__name__ return the name of my base class?
body: <p>I have a base class <code>A</code> that I inherit from to create class <code>B</code>.  If I call the name dunder on the class instance, I get the name of the class.  if I call the name dunder on the instance's base class, I get the name of the base class.  This makes sense so far.  However, if call the name dunder on the instance' super(), I don't get the name of the base class and I'm not sure why.  To make matters more confusing, If I call the name dunder on the supers()'s base class, I get the correct name for the base's base class <code>object</code>.</p>
  
  <pre><code>class A:
      pass
  
  
  class B(A):
      def __init__(self):
          self.inherited_class_name = self.__class__.__name__
          self.base_class_name = self.__class__.__bases__[0].__name__
          self.should_return_base_class_name = super().__class__.__name__
          self.base_class_base_class = super().__class__.__bases__[0].__name__
  
  
  if __name__ == '__main__':
      b = B()
      print(b.inherited_class_name)
      print(b.base_class_name)
      print(b.should_return_base_class_name)  # Why does this return "super" instead of "A"?
      print(b.base_class_base_class)  # Especially when this one works...
  </code></pre>
  
  <p>prints out</p>
  
  <pre><code>B
  A
  super 
  object
  </code></pre>
  
  <p>I don't understand why "super" is returned from my <code>should_return_base_class_name</code> call.</p>