代码
def func_out(func):
print("开始执行")
def fun_in(*args, **kwargs):
print('hello world')
result = func(*args, **kwargs)
print('hello python')
return result
return fun_in
@func_out # 这一行代码做的事情---> test = func_out(test)
def test(*args, **kwargs):
print(args, kwargs)
return '函数返回值:python3'
if __name__ == '__main__':
result = test("c", "c++", name="mark", age="18")
print(result)