TelenkovDmitry 8 månader sedan
förälder
incheckning
c09de3fb04
1 ändrade filer med 2 tillägg och 6 borttagningar
  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):