Replymessage unavailable
u can definite magic method called iter on Fruit, it returns iter((self.name, self.color)). Unpack it to Apple.
class Fruit:
def __init__(self, name, color):
self.name = name
self.color = color
def __iter__(self):
return iter((self.name, self.color))
class Apple(Fruit):
def __init__(self, name, color, variety, region):
super().__init__(name, color)
self.variety = variety
self.region = region
def describe():
print(f"{self.name, self.color, self.variety, self.region} are correct.")
x = Fruit("Apple", "red")
y = Apple("Apple", "red", "Fuji", "X_place")
z = Apple(*x, "Fuji", "X_place")