diff options
Diffstat (limited to 'itemList.py')
-rw-r--r-- | itemList.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/itemList.py b/itemList.py index 6252946..7dc2944 100644 --- a/itemList.py +++ b/itemList.py @@ -14,6 +14,17 @@ class itemList: def __setitem__(self, idx, item): self.data[idx] = item + def __delitem__(self, key): + self.date[key].removed = True + self.data.__delitem__(key) + + def remove(self, item): + item.removed = True + self.data.remove(item) + + def __contians__(self, item): + return (item in self.data) + def append(self, item): item.observer = self self.data.append(item) |