class Item: def __init__(self, name): self.name = name class Arme(Item): def __init__(self, name, stats_set): super().__init__(name) self.stats_set = stats_set def equip(): pass class Inventaire: def __init__(self): self.__content = [] def get_content(self): return self.__content def add_item(self, item): if isinstance(Item, item): self.__content.append(item) return self else: raise ValueError("item attends un objet Item") def remove_item(self, index): self.__content.pop(index) return self