2017年4月22日

python基础之封装

摘要: 在类内部定义的函数无非三种用途一:绑定到对象的方法 只要是在类内部定义的,并且没有被任何装饰器修饰过的方法,都是绑定到对象的 class Foo: def test(self): #绑定到对象的方法 pass def test1(): #也是绑定到对象的方法,只是对象.test1(),会把对象本身自 阅读全文

posted @ 2017-04-22 02:51 bigdata_devops 阅读(369) 评论(0) 推荐(0) 编辑

导航