Decorators: simple example


  • A decorators is that @something just before the declaration of the function.
  • Decorators can modify the behavior of functions or can set some meta information about them.


examples/decorators/simple.py

@some_decorator
def some_function():
    pass