'''
带参数的装饰器
'''

def out_f(arg):
    print("out_f" + arg)

    def decorator(func):
        def inner():
            func()
        return inner
    return decorator

@out_f("123")
def func():
    print("hello world")

func()
1831db7402c819179d263319e243a5f8c14e3e8d
<mask token>

<mask token>


@out_f('123')
def func():
    print('hello world')


<mask token>

<mask token>


def out_f(arg):
    print('out_f' + arg)

    def decorator(func):

        def inner():
            func()
        return inner
    return decorator


@out_f('123')
def func():
    print('hello world')


<mask token>

<mask token>


def out_f(arg):
    print('out_f' + arg)

    def decorator(func):

        def inner():
            func()
        return inner
    return decorator


@out_f('123')
def func():
    print('hello world')


func()

'''
带参数的装饰器
'''

def out_f(arg):
    print("out_f" + arg)

    def decorator(func):
        def inner():
            func()
        return inner
    return decorator

@out_f("123")
def func():
    print("hello world")

func()