when inner function return

PHOTO EMBED

Tue Mar 01 2022 08:07:47 GMT+0000 (Coordinated Universal Time)

Saved by @armin10020 #python

def test(func):
    print("this is funcion test")

    def inner():
        print("this is inner function")
        return func

    # return inner()
    inner()


# test()  #1

# print(test())


def test2():
    print("this is test 2")


# test(test2)     #1
a = test(test2)
a()
content_copyCOPY

it shows error cause the test function return nothing