对于python中的self,cls,decorator的理解
摘要:
1. self, cls 不是关键字 在python里面,self, cls 不是关键字,完全可以使用自己写的任意变量代替实现一样的效果 代码1 Python代码 classMyTest:myname='peter'defsayhello(hello):print"sayhelloto%s"%hello.mynameif__name__=="__main__":MyTest().sayhello... 阅读全文
posted @ 2009-07-11 04:52 eplussoft 阅读(6406) 评论(8) 推荐(0)
浙公网安备 33010602011771号