Python: Regular method and static method with same name
问题 Introduction I have a Python class, which contains a number of methods. I want one of those methods to have a static counterpart—that is, a static method with the same name—which can handle more arguments. After some searching, I have found that I can use the @staticmethod decorator to create a static method. Problem For convenience, I have created a reduced test case which reproduces the issue: class myclass: @staticmethod def foo(): return 'static method' def foo(self): return 'public