Primer on Python Decorators
Dec 14, 2024 intermediatepython
In this tutorial, you'll look at what Python decorators are and how you define and use them. Decorators can make your code more readable and reusable. Come take a look at how decorators work under the hood and practice writing your own decorators.
Quiz: Decorators
Jun 05, 2023 advancedpython
In this quiz, you'll revisit the foundational concepts of what Python decorators are and how to create and use them.
Course: Python Decorators 101
Mar 19, 2019 intermediatepython
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.
Python Timer Functions: Three Ways to Monitor Your Code
Dec 08, 2024 intermediatepython
In this step-by-step tutorial, you'll learn how to use Python timer functions to monitor how quickly your programs are running. You'll use classes, context managers, and decorators to measure your program's running time. You'll also learn the benefits of each method and which to use given the situation.
The Real Python Podcast – Episode #1: Python Decorators and Writing for Real Python
Mar 20, 2020
Do you want to learn more about Python decorators? Have you ever wondered what goes on behind the scenes to create a Real Python article? In this first episode, We have Geir Arne Hjelle from the Real Python team on the show.
Python Decorators 101 › Section 2 Review
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
The Real Python Podcast – Episode #132: Creating Tic-Tac-Toe With an AI Player & Shortcuts for Python Decorators
Nov 11, 2022
How do you create a computer opponent for a simple game within Python? Would you also like to learn how to adapt the game to run in a web browser or graphical user interface (GUI)? This week on the show, Christopher Trudeau is here, bringing another…
Python Decorators 101 › Section 3 Overview
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
Python Decorators 101 › Decorating Functions With Arguments
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
Python Decorators 101 › Decorators Course Introduction and Overview
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
Python Decorators 101 › Returning Values From Decorated Functions
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
Python Decorators 101 › Reusing Decorators
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
Python Decorators 101 › Section 1 Review
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
Caching in Python Using the LRU Cache Strategy
Nov 04, 2020 intermediatepython
Caching is an essential optimization technique. In this tutorial, you'll learn how to use Python's @lru_cache decorator to cache the results of your functions using the LRU cache strategy. This is a powerful technique you can use to leverage the power of caching in your implementations.
Python Decorators 101 › Simple Decorators
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
Python Decorators 101 › Slowing Down Code With Decorators
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
Python Decorators 101 › Decorators 101 Recap and Review
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
Python Decorators 101 › Timing Functions With Decorators
Mar 19, 2019 intermediatepython
Course lesson from: "Python Decorators 101"
Python's property(): Add Managed Attributes to Your Classes
Dec 15, 2024 intermediatebest-practicespython
In this tutorial, you'll learn how to create managed attributes in your classes using Python's property(). Managed attributes are attributes that have function-like behavior, which allows for performing actions during the attribute access and update.
The Real Python Podcast – Episode #192: Practical Python Decorator Uses & Avoiding datetime Pitfalls
Feb 16, 2024
What are real-life examples of using Python decorators? How can you harness their power in your code? Christopher Trudeau is back on the show this week, bringing another batch of PyCoder's Weekly articles and projects.