+ 4

What are the features of decorators?

Decorators are very useful, of course. But what opportunities can they give? I really want to hear ideas and examples of using this type of function because it is so interesting! Maybe just simple cases - all thoughts are great, I think.

19th May 2017, 8:51 AM
HolyDiver
HolyDiver - avatar
4 Respostas
+ 9
I had the same doubt. I mean, I understand them and all, but what the heck are they used for? This little article cleared everything for me: https://www.thecodeship.com/patterns/guide-to-JUMP_LINK__&&__python__&&__JUMP_LINK-function-decorators/
22nd May 2017, 8:17 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 5
Also, I gave an example piece of code here, hope you find it useful: https://www.sololearn.com/Discuss/197871/?ref=app
22nd May 2017, 9:03 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
Here is an example of what a decorator may be useful for: https://code.sololearn.com/cD09ijlIS6Ev/?ref=app
25th Mar 2018, 4:32 PM
Denys Yeromenko
Denys Yeromenko - avatar
+ 1
@Kuba Siekierzyński , thank you! These links are very useful:) Especially the article - it really makes everything clear.
23rd May 2017, 4:27 PM
HolyDiver
HolyDiver - avatar