title: Python - how can I get the class name from within a class method - using @classmethod
body: <p>I have the following code:</p>
  
  <pre><code>class ObjectOne(object):
      @classmethod
      def print_class_name(cls):
          print cls.__class__.__name__
  
      def print_class_name_again(self):
          print self.__class__.__name__
  
  if __name__ == '__main__':
      obj_one = ObjectOne()
      obj_one.print_class_name()
      obj_one.print_class_name_again()
  </code></pre>
  
  <p>The output is:</p>
  
  <pre><code>type
  ObjectOne
  </code></pre>
  
  <p>I would like the output to be:</p>
  
  <pre><code>ObjectOne
  ObjectOne
  </code></pre>
  
  <p>But I would like to keep <code>test_cls</code> as a class method via the <code>@classmethod</code> decorator.</p>
  
  <p>How can I accomplish this?</p>