06 关于返回值

def x1(func):
    def inner(*args,**kwargs):
        data = func(*args,**kwargs)
        return data
    return inner 

@x1
def f1():
    print(123)
    
v1 = f1()
print(v1)
def x1(func):
    def inner(*args,**kwargs):
        data = func(*args,**kwargs)
        return data
    return inner 

@x1
def f1():
    print(123)
    return 666
v1 = f1()
print(v1)

def x1(func):
    def inner(*args,**kwargs):
        data = func(*args,**kwargs)
    return inner 

@x1
def f1():
    print(123)
    return 666

v1 = f1()
print(v1)
posted @ 2024-09-26 22:34  jhchena  阅读(3)  评论(0编辑  收藏  举报