import random as r
class Fish:
def __init__(self):
self.x = r.randint(0,10)
self.y = r.randint(0,10)
def move(self):
self.x -= 1
print("my site is : " ,self.x,self.y)
class Shark(Fish):
def __init__(self):
super().__init__()
self.hungry =True
def eat(self):
if self.hungry:
print('My dream is eating everyday!')
self.hungry=False
else:
print('Too much ,Too much!!!')
shark = Shark()
报错TypeError: super() takes at least 1 argument (0 given)
求大神们指点~~~~,super().__init__() 哪有问题呀。。是在python3上运行的。