Reuven Lerner - Practical decorators
Channel: EuroPython Conference
Date: 2019-09-23

"Practical decorators
[EuroPython 2019 - Talk - 2019-07-11 - Shanghai]
[Basel, CH]

By Reuven Lerner

Decorators are one of Python's most powerful features. But even if you understand what they do, it's not always obvious what you can do with them. Sure, from a practical perspective, they let you remove repeated code from your callables. And semantically, they let you think at a higher level of abstraction, applying the same treatment to functions and classes.

But what can you actually do with them? For many Python developers I've encountered, decorators sometimes appear to be a solution looking for a problem.

In this talk, I'll show you some practical uses for decorators, and how you can use them to make your code more readable and maintainable, while also providing more semantic power. Moreover, you'll see examples of things would be hard to do without decorators. I hope that after this talk, you'll have a good sense of how to use decorators in your own Python projects.



License: This video is licensed under the CC BY-NC-SA 3.0 license: https://creativecommons.org/licenses/by-nc-sa/3.0/
Please see our speaker release agreement for details: https://ep2019.europython.eu/events/speaker-release-agreement/