Remove first occurrence of item
(self, item)
| 30 | self._items.insert(left, (item, weight)) |
| 31 | |
| 32 | def remove(self, item): |
| 33 | """Remove first occurrence of item""" |
| 34 | with self._lock: |
| 35 | for i, (stored_item, weight) in enumerate(self._items): |
| 36 | if stored_item == item: |
| 37 | self._items.pop(i) |
| 38 | return weight |
| 39 | raise ValueError("Item not found") |
| 40 | |
| 41 | def get_by_weight_range( |
| 42 | self, min_weight: float, max_weight: float |
no outgoing calls