G
Giovanni Bajo
Hello,
what's the magic needed to reuse the base-class implementation of a
classmethod?
class A(object):
@classmethod
def foo(cls, a,b):
# do something
pass
class B(A):
@classmethod
def foo(cls, a, b):
A.foo(cls, 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.
what's the magic needed to reuse the base-class implementation of a
classmethod?
class A(object):
@classmethod
def foo(cls, a,b):
# do something
pass
class B(A):
@classmethod
def foo(cls, a, b):
A.foo(cls, 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.