There is some issues with decorator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

There is some issues with decorator

In the first demonstration part, how come it return wrap instead of wrap()?

18th Dec 2017, 3:11 PM
Xmei
4 Answers
+ 2
18th Dec 2017, 3:17 PM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
Yep
19th Dec 2017, 2:44 AM
Xmei
0
I’ve consult one of my friend. He said return wrap return a actual function while return wrap() return a specific result.
19th Dec 2017, 2:47 AM
Xmei
0
Here is an explanation of the decorator usage: https://code.sololearn.com/cD09ijlIS6Ev/?ref=app
7th Jun 2018, 2:03 AM
Denys Yeromenko
Denys Yeromenko - avatar