http://www.runoob.com/w3cnote/python-func-decorators.html
def use_decrating(fun):
def wrapppppper(*args, *kargs):
print('the decrating is doing something')
print('this is %s running'%fun.__name__)
return fun(*args, *kargs)
return wrapppppper
# def printttt():
# print('abc print')
# def forrrrr():
# print('abc forrrrr')
def loggging():
print('abc loggging')
#这是正规的装饰器使用
loggging = use_decrating(loggging)
loggging()
# 这个@是语法糖
@use_decrating
def printttt():
print('abc print')
printttt()
print('\n', end='')
@use_decrating
def forrrrr():
print('abc forrrrr')
forrrrr()