title: What is the Python equivalent of a Ruby class method?
body: <p>In ruby you can do this:</p>
  
  <pre><code>class A
      def self.a
          'A.a'
      end
  end
  
  puts A.a #-&gt; A.a
  </code></pre>
  
  <p>How can this be done in python. I need a method of a class to be called without it being called on an instance of the class. When I try to do this I get this error:</p>
  
  <pre><code>unbound method METHOD must be called with CLASS instance as first argument (got nothing instead)
  </code></pre>
  
  <p>This is what I tried:</p>
  
  <pre><code>class A
      def a():
         return 'A.a'
  
  print A.a()
  </code></pre>