TelenkovDmitry 10 달 전
부모
커밋
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):