Может кто-нибудь объяснить, почему функции-оболочки в декораторах нужно возвращать, а также почему
def decorate(func):
def wrapper():
print("Text")
test_function()
@decorate
def test_function():
print("More text")
test_function()
создает объект NoneType, который не вызывается, а не
def decorate(func):
def wrapper():
print("Text")
test_function()
return wrapper
@decorate
def test_function():
print("More text")
test_function()