Decorators in Python: How to Write Your Own Custom Decorators

Опубликовано: 11 Октябрь 2024
на канале: pixegami
5,583
268

The decorator design pattern in software engineering, is generally when you extend something (like an object or a function) with additional functionality.

In this video, you'll learn what a decorator is, and learn how to apply them to time and optimize a function.

🔗 Code: https://github.com/pixegami/python-de...

00:00 Introduction
01:09 What are decorators?
01:37 Writing a "timer" decorator
04:51 Using a decorator to cache Fibonacci
08:50 Python built-in decorators

#python #decorators