Decorators allow the programmer to redirect a function call in a predictable and manageable fashion. The following is an example of the basic syntax.
class Class:The goal of this new syntax is to make it easier for programmers to see the interrelationship between methods.
def method(cls)
...
@method
def function:
pass
An incidental plus is that one can knit two different pieces of code together very cleanly without editing either the function or the function call. Simply create a function to match the call and have it decorated to the desired function.
This is the basic syntax, but a concrete example is really needed to illustrate this feature. The following pages look at the use of single and multiple decorators for functions and the value they hold for Python programming.

