+ 1

Can anyone explain me decorators in easiest way

4th Sep 2022, 5:43 AM
AlphaX
AlphaX - avatar
3 Respostas
+ 2
Decorator fn: Hey give me your function, I make a cooler function from it and give it back to to you. Program: But I can add myself sth. cool! Decorator: but once defined u can do it with every function Program: Hey Decorator okay I call you with @fn before the function I send to to you.
4th Sep 2022, 8:24 AM
Oma Falk
Oma Falk - avatar
+ 2
A decorator is simply a function that modifies a function and can be called via "@"
4th Sep 2022, 6:45 AM
Евгений Молдованов
Евгений Молдованов - avatar
+ 2
It's better to read on "habr"
4th Sep 2022, 6:48 AM
Евгений Молдованов
Евгений Молдованов - avatar