How to override a static method and keep it static?
In [6]: class Foo(object): ...: @staticmethod ...: def foo(a, b): ...: print a + b ...: ...: In [7]: Foo.foo Out[7]: <function foo at 0x86a1a74> In [8]: class Bar(Foo): ...: def foo(a, b): ...: print a - b ...: ...: In [9]: Bar.foo Out[9]: <unbound method Bar.foo>
I tried to decorate Bar foo with a static method and it works. But I have to subclass it every time.
source share