title: What's the difference between accessing a class' attribute via the class' name vs classmethod?
body: <p>I was asked during an interview what is the difference between the following two ways to access a class' attribute:</p>
  <pre><code>class Klass:
      x = 10
  
      @staticmethod
      def foo():
          return Klass.x
  
      @classmethod
      def bar(cls):
          return cls.x
  </code></pre>
  <p>PS: I know the difference between <code>classmethod</code> and <code>staticmethod</code>.</p>