Using TestStatic.do_something(), you will get around any override in the subclass:
class SubclassStatic(TestStatic):
@staticmethod
def do_something():
print 'I am the subclass'
s = SubclassStatic()
s.use_me()
will print
I am the subclass
I am static
This may be what you wanted, or perhaps it is not. Choose the method that best suits your expectations.
source
share