In the previous lesson, we learned a lot about how Python decorators work and how they make use of several Python concepts to work including closures, and the scope of a function. To further our knowledge of Python function techniques, we’ll learn more about decorators as we work with real-world decorators and learn how to write decorators that take arguments.
In the final lesson of our Python Advanced Functions course, we’ll learn more about Python decorators so you can start to recognize common decorator patterns. You’ll also look at some decorators that take multiple arguments. By the end of this mission, you’ll be able to explain what decorators are, how they work, how to use them, and how to write decorators of your own.
Most importantly, you will know why they work the way they do.
As you learn about Python decorators and how to use them, you’ll get to apply what you’ve learned from within your browser so that there’s no need to use your own machine to do the exercises. The Python environment inside of this course includes answer checking so you can ensure that you’ve fully mastered each concept before learning the next concept.
- Learn how to write decorators that take arguments.
- Learn how to make sure your decorated functions maintain their metadata.
- Work with real world decorators.
- Real World Decorators
- Preserving Metadata When Decorating Functions
- Preserving Metadata When Decorating Functions Continued
- Adding Arguments to Decorators
- Adding Arguments to Decorators Continued
- Real World Decorators with Arguments
- Real World Decorators with Arguments Continued
- Next Steps