diff --git a/src/product.py b/src/product.py index 7795a9f..8494cf1 100644 --- a/src/product.py +++ b/src/product.py @@ -11,7 +11,7 @@ def __str__(self): return f"{self.name}, {self.price} руб. Остаток: {self.quantity} шт." def __add__(self, other): - if type(self) is not type(other): + if type(self) is not type(other): #Исправил raise TypeError("Нельзя складывать товары разных классов") return (self.price * self.quantity) + (other.price * other.quantity)