摘要: 1.类的封装 封装:隐藏属性或方法,外部无法使用,内部可以使用,在类定义阶段就执行了,真的想引用,就使用_类名__属性名 class Foo: def __f1(self): #_Foo__f1 print('Foo.f1') def f2(self): # Foo print('Foo.f2') 阅读全文
posted @ 2019-06-20 16:34 海森t 阅读(39) 评论(0) 推荐(0)