About 53,800,000 results
Open links in new tab
  1. Decorators in Python - GeeksforGeeks

    Sep 22, 2025 · In Python, decorators are flexible way to modify or extend behavior of functions or methods, without changing their actual code. A decorator is essentially a function that takes another …

  2. Python Decorators Introduction

    Learn Python Decorators in this tutorial. Add functionality to an existing function with decorators. This is called metaprogramming. A function can take a function as argument (the function to be decorated) …

  3. Python Decorators (With Examples) - Programiz

    In Python, a decorator is a design pattern that allows you to modify the functionality of a function by wrapping it in another function. The outer function is called the decorator, which takes the original …

  4. Primer on Python Decorators

    Python decorators allow you to modify or extend the behavior of functions and methods without changing their actual code. When you use a Python decorator, you wrap a function with another …

  5. What are Decorators in Python? Explained with Code Examples

    Jun 18, 2024 · In this tutorial, you will learn about Python decorators: what they are, how they work, and when to use them. Decorators are a powerful and elegant way to extend the behavior of functions or …

  6. Python Decorators - W3Schools

    Decorators let you add extra behavior to a function, without changing the function's code. A decorator is a function that takes another function as input and returns a new function.

  7. How to Use Python Decorators (With Function and Class-Based …

    Apr 4, 2025 · A decorator is a design pattern in Python that allows a user to add new functionality to an existing object without modifying its structure. Decorators are typically applied to functions, and they …

  8. python - What is the purpose of decorators (why use them)? - Stack Overflow

    Oct 1, 2018 · I've been learning and experimenting with decorators. I understand what they do: they allow you to write modular code by allowing you to add functionality to existing functions without …

  9. Python Decorators & Generators: A Complete Guide for 2025

    Jul 8, 2025 · 🔧 What Are Python Decorators? A decorator in Python is a function that wraps another function to modify or enhance its behavior — without changing its source code.

  10. PythonDecorators - Python Wiki

    A Python decorator is a specific change to the Python syntax that allows us to more conveniently alter functions and methods (and possibly classes in a future version).