Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 661 Bytes

introduction.md

File metadata and controls

7 lines (5 loc) · 661 Bytes

Introduction

Functions are first-class objects in Python, which means they can also be passed as arguments to other functions. Decorators are higher-order functions that take another function as an argument and return it after extending or modifying its behavior. Decorators are defined in the same way as any other function, but they are applied on the line above the functions they are decorating using the @ symbol before their names (@my_decorator). While they can take multiple arguments, decorators must take at least the function they are decorating as an argument.