标签:python
def log(func): def wrapper(*args,**kw): print 'call %s():'%func.__name__ return func(*args,**kw) return wrapper @log def now(): print 'hello!' now()
decorator
原文地址:http://blog.csdn.net/dapeng0112/article/details/40425965