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

Pluralsight

Python 3 Decorators

via Pluralsight

Overview

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.


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.

Syllabus

  • Course Overview 1min
  • Working with Higher Order Functions and Closures 23mins
  • Implementing Function Decorators 23mins
  • Using Advanced Decorator Workflows 14mins
  • Decorating Classes and Class Decorators 22mins

Taught by

Mateo Prigl

Reviews

5 rating at Pluralsight based on 45 ratings

Start your review of Python 3 Decorators

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.