python基础之调用父类的方法

方法一: >>> class cat(object):#父类 def eat(self): print("the cats love fishes") >>> class BlackCat(cat):#子类 def eat(self): cat.eat(self)#调用父类的方法 print("the BlackCat love mouse too") >>> kity=Bl
相关文章
相关标签/搜索