Decorators (Slideshow)¶
The Ominous “@
Ӧ
Special syntax ⟶ only syntactic sugar
Used to wrap existing functions/methods
Without modifying them
Examples
Debugging: printing function name and arguments
Timing information: time spent inside a function
Adding a D-Bus interface to a plain Python class
Defining Flask URL routes to call Python functions
…