python 装饰器例子

def debug(func): def wrapper(word): print("[DEBUG]: enter {}()".format(func.__name__)) return func(word) return wrapper @debug def say_hello(word): print("hello!%s"%(word)
相关文章
相关标签/搜索