Python Object-Oriented Python Inheritance Super!

Alfred Moha
Alfred Moha
3,863 Points

need help class SortedInventory (Inventory): def add_item(self, item): super().add_item(item)

need a help

inventory.py
class Inventory:
    def __init__(self):
        self.slots = []

    def add_item(self, item):
        self.slots.append(item)

class  SortedInventory (Inventory):
    pass

class SortedInventory (Inventory):
    def add_item(self, item):
    super().add_item(item)
Chris Freeman
Chris Freeman
Treehouse Moderator 57,145 Points

Looks like you have an indentation issue with your super statement.