Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

Introduction to Decorators - Power UP Your Python Code

PyCon US via YouTube

Overview

Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Learn how to leverage Python's powerful decorator syntax to enhance your code's capabilities in this comprehensive tutorial. Explore functions as first-class objects, function references, and function factories before diving into decorators. Discover how to create and apply decorators to improve code efficiency and readability. Practice with hands-on exercises covering topics such as unpacking lists, handling return values, and implementing a stack reader. By the end of this 2.5-hour session, gain the skills to confidently use and create decorators, becoming a more proficient Python programmer.

Syllabus

Introduction
What are decorators
Functions are first class objects
Function references
Function factories
Decorators
Reverse Factory
Exercise
Solution
Unpacking of Lists
Exercise 2 Return Values
Exercise 3 Stack Reader
Defining Decorators

Taught by

PyCon US

Reviews

Start your review of Introduction to Decorators - Power UP Your Python Code

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.