Simple play icon Course
Skills

Python 3 Decorators

by Mateo Prigl

Decorators allow programmers to modify the functionality of an object without permanently modifying the object’s structure. This course will teach you how to create and use decorators in Python.

What you'll learn

Decorator pattern in Python allows you to add new functionality to an object by wrapping it in another function. In this course, Python 3 Decorators, you’ll learn what decorators are and how to use them in your projects. First, you’ll explore functions as first-class objects in Python. This will allow us to learn about higher order functions, inner functions and closures. All of these concepts are necessary for us to understand how decorators work in Python. Next, you’ll discover how to create and use your own decorators with Python's special syntax. Once we know the basics of decorators, we will learn how to stack them and how to create decorators with arguments. Finally, you’ll learn how to create decorators for classes and how to use classes instead of functions to create decorators. When you’re finished with this course, you’ll have the skills and knowledge of Python 3 Decorators needed to create and use decorators to make your applications more flexible.

About the author

Mateo is currently a full stack web developer working for a company that has clients from Europe and North America. His niche in programming was mostly web oriented, while freelancing, working on small startups and companies that require his services. Go(lang), Elixir, Ruby and C are his favorite languages and also the ones he’s mostly working with other then PHP in day to day work. He has a big passion for learning and teaching what he knows the best. His big interests recently have been the fi... more

Ready to upskill? Get started