Decorators are one of the most powerful techniques that a Python developer can have in their arsenal. But decorators are also among the most confusing topics that most developers encounter.
In this recording of a four-hour class I gave in October 2021, I teach everything you need to know about decorators — what they are, how they work, and how to use them in your work:
- How decorators work
- How to decorate functions
- Using decorators for private storage across function invocations
- Decorators with arguments
- Nested decorators
- Decorating classes
As with all of my courses, I live-coded everything, and we had a bunch of exercises. The Jupyter notebooks and files I created are available, as well.