title: Get parent class name?
body: <pre><code>class A(object):
      def get_class(self):
          return self.__class__
  
  class B(A):
      def __init__(self):
          A.__init__(self)
  
  b = B()
  print b.get_class()
  </code></pre>
  
  <p>This code will print <code>&lt;class '__main__.B'&gt;</code>.</p>
  
  <p>How can I get the class name where the method has been defined (namely <code>A</code>)?</p>