标签:
import functools def log(option): def dec(func): def swapper(*arg, **karg): functools.update_wrapper(swapper, func) opt = format(option,"^7") print ‘[‘+opt+"] enter",func.__name__ res = func(*arg, **karg) print ‘[‘+opt+‘] exit‘,func.__name__ return res return swapper return dec
标签:
原文地址:http://www.cnblogs.com/backinfile/p/5953726.html