python基础学习笔记(二)类和对象

类和子类 class bird(object): def __init__(self,sound): #magic mehod 先后两个下划线 如__add__() self.sound=sound #__dict__() print("init sound:",sound) def chirp(s
相关文章
相关标签/搜索