2017年10月24日

面向对象

摘要: 成员修饰符 私有成员 __字段名 class Foo: def __init__(self, name, age): self.__name = age#私有,外部无法直接访问 def show(self): return sef.__age obj = Foo('age',23) ret = ob 阅读全文

posted @ 2017-10-24 11:25 福永幸运儿 阅读(79) 评论(0) 推荐(0)

导航