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
1 ответ
+ 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.