标签:utf-8 python ret pytho inner 模板 pre log class
模板是这样的
#-*-coding:utf-8-*-
def outer(func):
def inner():
print ‘before‘
func()
print ‘after‘
# return r
return inner
‘‘‘
def outer_1(func):
def inner():
print ‘before‘
func()
print ‘after‘
# return r
return inner
@outer_1
‘‘‘
@outer
def F1():
print ‘test‘
F1()
before
test
after
[Finished in 0.1s]
标签:utf-8 python ret pytho inner 模板 pre log class
原文地址:http://www.cnblogs.com/alamZ/p/7007945.html