I have the class Dove that inherits from Animal and Bird. The parameters from Animal are passed by super(). How I can pass the parameters from Bird to Dove? I got this error: AttributeError: 'Dove' object has no attribute 'wings'
class Animal():
def __init__(self, name):
self.name = name
def eat(self):
print('{} is eating'.format(self.name))
class Bird():
def __init__(self, wings):
self.wings = wings
def fly(self):
print('Is time to fly with {} wings'.format(self.wings))
class Dove(Animal, Bird):
def __init__(self, name, wings):
super().__init__(name)
Bird(self).__init__(wings)
def action_fly(self):
Bird.fly(self)
dove1=Dove('dove', 4)
dove1.action_fly()