+ 1

Decorators

Hi, I have just done the decorater, but I can't understand what they are, all the code given by Sololearn does not work at all, they give errors on all other compilers, meaning that I can't look at the code with decorators. I have searched on google, but I can't understand what they are. Can somebody please explain me what a decorator is with a example? Thank you

7th Jul 2022, 8:26 AM
Danish Zubair
Danish Zubair - avatar
3 Answers
+ 4
Danish Zubair Decorators are difficult to understand, the best way is to play with them. I wrote a little code for you to keep & adjust / play with. Why don't you add a few extra attack methods and pretty up the wrapper https://code.sololearn.com/cje5x7FFR2Ip/?ref=app
7th Jul 2022, 10:44 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 3
Rik Wittkopp thank you, I'm gonna try.
7th Jul 2022, 10:46 AM
Danish Zubair
Danish Zubair - avatar