摘要: 定义类 class 类名: def 函数名(self): #哪个对象调用这个方法,self就是哪个对象 语句 def 函数名(self): #类中定义函数,第一个参数要是self 语句 变量=类名() #创建类 类的内置方法 class cat(): def __new__(self): #在ini 阅读全文
posted @ 2020-04-01 11:05 ForLivetoLearn 阅读(149) 评论(0) 推荐(0) 编辑