[root@localhost /]#
[root@localhost /]#
[root@localhost /]# cat z.py
#!/bin/python
from functools import update_wrapper, wraps
def a(b,c=3,d=[]):
'''aaaaaaaaaaaaaa'''
return a*2
#print a.__name__
#print a.__defaults__
#print a.__doc__
def zhu(func):
@wraps(func)
def zlg():
'''bbbbbbbbbbbbb'''
print 'cccccccccc'
func()
#update_wrapper(zlg,func)
return zlg
@zhu
def haha():
'''kkkkkkkkkkkkk'''
print 'ffffffffffffffffff'
print haha.__doc__
print haha.__name__
[root@localhost /]#
[root@localhost /]#
阅读(1779) | 评论(0) | 转发(0) |