TelenkovDmitry 8 ヶ月 前
コミット
c09de3fb04
1 ファイル変更2 行追加6 行削除
  1. 2 6
      courses/python_oop/method_task_2.py

+ 2 - 6
courses/python_oop/method_task_2.py

@@ -55,16 +55,12 @@ class Cart:
 
         self.__total += product.price * count
     
-    def remove(self, product:Product, count=1):
+    def remove(self, product:Product, number=1):
         if number >= self.goods[product]:
             number = self.goods[product]
             self.goods[product] = self.goods.get(product, 0) - number
             self.__total -= number * product.price
-        '''
-        else:
-            self.__total -= self.goods[product] * product.price
-            self.goods[product] = 0
-        '''
+
 
     @property
     def total(self):