@staticmethod def meth)meth staticmethod(methclass @property def name(self)name property(namein both casesthe method name is rebound to the result of built-in function decoratorat the end of the def statement calling the original name later invokes whatever object the decorator returns in these specific casesthe original names are rebound to static method router and property descriptorbut the process is much more general than this --as the next section explains implementation decorator itself is callable that returns callable that isit returns the object to be called later when the decorated function is invoked through its original name--either wrapper object to intercept later callsor the original function augmented in some way in factdecorators can be any type of callable and return any type of callableany combination of functions and classes may be usedthough some are better suited to certain contexts for exampleto tap into the decoration protocol in order to manage function just after it is createdwe might code decorator of this formdef decorator( )process function return @decorator def func()func decorator(funcbecause the original decorated function is assigned back to its namethis simply adds post-creation step to function definition such structure might be used to register function to an apiassign function attributesand so on in more typical useto insert logic that intercepts later calls to functionwe might code decorator to return different object than the original function-- proxy for later callsdef decorator( )save or use function return different callablenested defclass with __call__etc @decorator def func()func decorator(functhis decorator is invoked at decoration timeand the callable it returns is invoked when the original function name is later called the decorator itself receives the decorated functionthe callable returned receives whatever arguments are later passed to the decorated function' name when coded properlythis works the same for class-level decorators