码迷,mamicode.com
首页 >  
搜索关键字:高端大气上档次的python装饰器    ( 2个结果
python 装饰器
#!/usr/bin/envpython defdeco(func1):#defineadecoratefunctiondeco defwrapper(): print"HelloPython!" func() print"IamProfero!" returnwrapper @deco#use@decocall deffunc2():#definefunc2 print"What‘syourname?" func2#callfunc2 #Theresult: HelloPython! What‘syo..
分类:编程语言   时间:2015-11-11 22:25:25    阅读次数:227
python 装饰器
#!/usr/bin/envpython defdeco(func1):#defineadecoratefunctiondeco defwrapper(): print"HelloPython!" func() print"IamProfero!" returnwrapper @deco#use@decocall deffunc2():#definefunc2 print"What‘syourname?" func2#callfunc2 #Theresult: HelloPython! What‘syo..
分类:编程语言   时间:2015-11-11 22:25:15    阅读次数:247
2条  
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!