class Fruit:
def __init__(self, name, color):
self.name = name
self.color = 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")
print(x)
print(y)
print(z)
now if you print, I'll get error that I'm missing one argument in z. I don't want to keep refilling parent's parameters everytime I create a new object.