Reuse base-class implementation of classmethod?

Giovanni Bajo noway at
Tue Nov 1 01:24:37 CET 2005


what's the magic needed to reuse the base-class implementation of a

class A(object):
   def foo(cls, a,b):
       # do something

class B(A):
    def foo(cls, a, b):, a, b)   # WRONG!

I need to call the base-class classmethod to reuse its implementation, but I'd
like to pass the derived class as first argument.
Giovanni Bajo

More information about the Python-list mailing list