Hello,
Referring to the first answer about python's bound and unbound methods here, I have a question:
class Test:
def method_one(self):
print "Called method_one"
@staticmethod
def method_two():
print "Called method_two"
@staticmethod
def method_three():
Test.method_two()
class T2(Test):
@staticmethod
def method_two():
print "T2"
a_test = Test()
a_test.method_one()
a_test.method_two()
a_test.method_three()
b_test = T2()
b_test.method_three()
produces output:
Called method_one
Called method_two
Called method_two
Called method_two
Is there a way to override a static method in python?
I expected b_test.method_three()
to print "T2", but it doesn't (prints "Called method_two" instead).