def clean_items(items: ItemList): """Remove elements from an item list.""" items._items = []
def set_items(items: ItemList, value: List): """Remove elements from an item list.""" items._items = value
def strip_duplicate_items(items: ItemList): """Remove duplicates from an item list.""" new_items = {} for item in items: new_items[item.name] = item items._items = list(new_items.values())