我需要知道为什么这个代码的输出是sayhello()only?
def myDecorator(func): # Decorator
def nestedfunc(): # Any Name Its Just For Decoration
print("Before") # Message From Decorator
func() # Execute Function
print("After") # Message From Decorator
return nestedfunc # Return All Data
def sayHello():
print("Hello from sayHello function")
myDecorator(sayHello())