0

What happens to the return statements of yo()

i was just learning decorators and i cant seem to figure out what happens to the return statement after decoration . Below is the link to code https://code.sololearn.com/c2xD1SVY0Ab3/?ref=app

3rd May 2021, 12:50 PM
Suryansh sharma
Suryansh sharma - avatar
1 Answer
+ 2
After decoration, yo() is now defined to: print("hi") print("Hello") #from previous yo() print("hi") You see, it now doesn't return a value. If you make gun() return something, yo() will then return that.
3rd May 2021, 1:27 PM
äœ çŸ„é“èŠć‰‡ïŒŒæˆ‘äčŸæ˜Ż
äœ çŸ„é“èŠć‰‡ïŒŒæˆ‘äčŸæ˜Ż - avatar