title: Calling a base class's classmethod in Python
body: <p>Consider the following code:</p>
  
  <pre><code>class Base(object):
  
      @classmethod
      def do(cls, a):
          print cls, a
  
  class Derived(Base):
  
      @classmethod
      def do(cls, a):
          print 'In derived!'
          # Base.do(cls, a) -- can't pass `cls`
          Base.do(a)
  
  if __name__ == '__main__':
      d = Derived()
      d.do('hello')
  
  &gt; $ python play.py  
  &gt; In derived! 
  &gt; &lt;class '__main__.Base'&gt; msg
  </code></pre>
  
  <p>From <code>Derived.do</code>, how do I call <code>Base.do</code>? </p>
  
  <p>I would normally use <code>super</code> or even the base class name directly if this is a normal object method, but apparently I can't find a way to call the classmethod in the base class. </p>
  
  <p>In the above example, <code>Base.do(a)</code> prints <code>Base</code> class instead of <code>Derived</code> class.</p>