python的decorator
时间:2010-11-23 来源:cornsea
def abc(fun):
def myfun():
print "abc"
fun()
return myfun
@abc
def test():
print "test"
print test
test()
我这里的输出是:
<function myfun at 0xb7598a74>
abc
test
:)
相关阅读 更多 +










