3 ms·
Because `@extend` should work for the middle of an inheritance hierarchy too, not just the tips: class Base: def foo(self): print('base')
by tonyg 4y ago
Because `@extend` should work for the middle of an inheritance hierarchy too, not just the tips:
class Base:
def foo(self):
print('base')
class Mid(Base):
def foo(self):
print('mid')
super(self.__class__, self).foo()
class Derived(Mid):
def foo(self):
print('derived')
super(self.__class__, self).foo()
Derived().foo()