Python Decorators 101

In this course on Python decorators, you’ll learn what they are and how to create and use them. Decorators provide a simple syntax for calling higher-order functions in Python. By definition, a decorator is a function that takes another function and extends the behavior of the latter function without explicitly modifying it.

About Christopher Bailey

Christopher Bailey Christopher Bailey

Chris is an avid Pythonista and creates video tutorials for Real Python. He is a programmer and data analyst. He creates music under the name Tripnet. Chris lives in Colorado with his wife and two dogs.

» More about Christopher

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:

Dan Bader

Dan

Participant Comments

Bradon on March 19, 2019

Great overview of decorators!

Rynaldo I Bama on March 24, 2019

It explains the concepts clearly and concisely.

Sagar on March 28, 2019

Thanks for the awesome tutorial on Decorators. If I had to study decorators for an interview this would be my one stop shop for decorators starting right from the Beginner

DMonty on March 30, 2019

The video version of this tutorial was much better for me than the written one, which to me just seemed like an exercise to go through. I found the real world examples almost riveting and have them safely saved away!

Anonymous on April 4, 2019

Very helpful tutorial. Thanks!

Vignesh Anand Krishnan on April 8, 2019

These video materials are so better than the written articles. keep up the good work guys.

Javier Estraviz on April 22, 2019

Great tutorial!! Thanks!

Alan Eng on May 7, 2019

Mind = blown. The real-world examples really solidify my knowledge! Thanks.

Vanam on May 9, 2019

Excellent Tutorial and good examples

Fahim on June 24, 2019

Good real world example. Thanks

Patrick Prince on Feb. 15, 2020

Lots of material was covered here. Very useful. Thanks!

rtbjobsml on Feb. 27, 2020

A great intro to decorators

marktripney on April 6, 2020

I was working through a tutorial on OOP, and decorators were mentioned. Not being very confident that I knew what they were, I found myself here, and I’ve learned a huge amount already. Excellent course, Christopher - thank you.

Howard M Sherman on April 22, 2020

Really liked this class. It was a slow and methodical exposition on a difficult topic. I’ll probably review the class a few more times for it all to sink in. Thanks Chris!!!

eshivaprasad on May 5, 2020

It is very clear Christopher Bailey. I really enjoyed it. Continue your great work

acharya2chn on June 19, 2020

Thank you for this masterpiece! There is so much to understand and learn.

« Browse All Courses