We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Python Decorators: Gift or Poison?

Formal Metadata

Title
Python Decorators: Gift or Poison?
Title of Series
Number of Parts
132
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Why would you ever need to use decorators in Python? Have you ever had the task when you need to use one function in few places and you really wanted to avoid of code duplicating? For example to add some logging into functions or timers, etc. Decorators in Python are super powerful with these tasks, but at the same time they are super complicated, sometimes even magical. When I started learning Python, Decorators were really like a magic: how to use them, how are they working, lots of questions. The goal is to make the things easier and clear to answer a question: to use or not to use Decorators in your project. What’s in the Talk: - Functions nature in Python - Magic of a Decorator - Basics - When to use Decorators - Examples - Even more Python magic