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.
@some_decorator
def some_function():
pass
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
@some_decorator
def some_function():
pass