let' get started with first-pass look at decoration behavior from symbolic perspective we'll write real and more substantial code soonbut since most of the magic of decorators boils down to an automatic rebinding operationit' important to understand this mapping first function decorators function decorators have been available in python since version as we saw earlier in this bookthey are largely just syntactic sugar that runs one function through another at the end of def statementand rebinds the original function name to the result usage function decorator is kind of runtime declaration about the function whose definition follows the decorator is coded on line just before the def statement that defines function or methodand it consists of the symbol followed by reference to metafunction-- function (or other callable objectthat manages another function in terms of codefunction decorators automatically map the following syntax@decorator def (arg)decorate function ( call function into this equivalent formwhere decorator is one-argument callable object that returns callable object with the same number of arguments as (in not itself)def (arg) decorator(frebind function name to decorator result ( essentially calls decorator( )( this automatic name rebinding works on any def statementwhether it' for simple function or method within class when the function is later calledit' actually calling the object returned by the decoratorwhich may be either another object that implements required wrapping logicor the original function itself in other wordsdecoration essentially maps the first of the following into the second --though the decorator is really run only onceat decoration timefunc( decorator(func)( this automatic name rebinding accounts for the static method and property decoration syntax we met earlier in the bookthe basics