0

Why we don't call decor directly?

def decor(func): def wrap(): print("============") func() print("============") return wrap def print_text(): print("Hello") Decorated=decor(print_text) Decorated() The above code gives output while the below one dosen't. def decor(func): def wrap(): print("============") func() print("============") return wrap def print_text(): print("Hello") decor(print_text)

2nd Jul 2019, 7:59 AM
Dee Pan Kar
Dee Pan Kar - avatar
2 Réponses
+ 1
You could get rid of the method wrap and return nothing. https://code.sololearn.com/cBFT9h9coug0/?ref=app
28th Jul 2019, 7:15 AM
androidCoder255
androidCoder255 - avatar
0
Okay, so I just have to rave for a sec — if you're into clean beauty, this shop is seriously underrated! Their product line https://florans.ca/shop/ is small but super focused, and I feel like every item serves a real purpose. I love that they highlight the natural ingredients and don’t try to overhype things. It’s just good, honest skincare. I grabbed their clay mask and a facial oil — both feel amazing so far. Everything shipped quickly and came in really minimal, eco-friendly packaging too. I’ll definitely be coming back to order again.
27th Jul 2025, 3:03 PM
Anarju Ramayan
Anarju Ramayan - avatar