Can someone explain how the source code of staticmethod works in python
问题 First of all, I understand how, in general, a decorator work. And I know @staticmethod strips off the instance argument in the signature, making class C(object): @staticmethod def foo(): print 'foo' C.foo //<function foo at 0x10efd4050> C().foo //<function foo at 0x10efd4050> valid. However, I don't understand how the sourcec code of staticmethod make this happen. It seems to me that when wrapping method foo in staticmethod , an instance of staticmethod is instantiated, then some magic