Tutorials: Introduction to Decorators: Power Up Your Python Code

Presented by:


Description

Python supports functions as first-class objects. This means that functions can be assigned to variables, and passed to and from other functions, just like any other object in Python.

One powerful application of this is the decorator syntax, which makes it easy to apply one function to another at compile time. Decorators offer a simple and readable way of adding capabilities to your code. This tutorial will teach you how decorators work, and how to create your own decorators.

Being comfortable with using and creating decorators, will make you a more efficient Python programmer.