标签:
from _ctypes_test import func def deco1(arg): def mid_deco1(function): def new_func(): print ("deco1 > new_function : arg=%s" %(arg)) return function() return new_func return mid_deco1 @deco1("abc") def function1(): print "function1" def deco2(arg): def mid_deco2(function): def new_func(a): print ("deco2 > new_function : arg=%s" %(arg)) return function(a) return new_func return mid_deco2 @deco1("abc") def function2(a): print "function2" if "__name__" == "__main__": function1() function2()
标签:
原文地址:http://www.cnblogs.com/lifeinsmile/p/5245750.html