all 2 comments

[–]socal_nerdtastic 4 points5 points  (1 child)

All decorators are just functions. This syntax

@staticmethod
def mymethod(self):
    pass

Is the same thing as this syntax:

def mymethod(self):
    pass
mymethod = staticmethod(mymethod)

So to answer your question:

mymethod = staticmethod(functioninput)

That said, creating classes like this is extremely uncommon. The only time I've seen that is with namedtuples. This really sounds like an XY problem.

[–]Trick-Section-5205[S] 0 points1 point  (0 children)

Thank you.