Re: Help with oop

2020-02-23 Thread DL Neil via Python-list
def add_item(self, item_object):  if len(self.inventory) <= self.capacity:  self.inventory.append(item_object)  return True  else:  print("Reached max capacity")  return False on behalf of DL Neil via Python-list *Sent:* Sunday, February 23, 2020 4:41:54 PM *To:* python-list@

Re: Help with oop

2020-02-23 Thread DL Neil via Python-list
On 22/02/20 10:45 PM, S Y wrote: How can I use remove,add and verify methods in class oop. Which has tuple with allowed values inside class. Like two classes cart and inventory Please show the code you have so-far. What are you removing, adding, and verifying? Are you aware of the Python-Tutor

Help with oop

2020-02-22 Thread S Y
How can I use remove,add and verify methods in class oop. Which has tuple with allowed values inside class. Like two classes cart and inventory Get Outlook for iOS -- https://mail.python.org/mailman/listinfo/python-list