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
相關文章
相關標籤/搜索