- A decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it.
-
Run this from your shell:
python decorator_as_function.py
- code
- Run this from your shell:
python decorator_as_class.py