Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Iain Watson3,031 Points
Override add_item in Super! Task 2 of 3 (and cf override init in characters.py)
I'm not sure what this is asking. In characters.py there were 2 inits in Thief(Character) the 1st of which was used to add the attribute sneaky. I'm not sure how to override a method in the superclass and then have it still run in the subclass. And why would you want to do that?
self.slots = 
def add_item(self, item):
Oszkár FehérTreehouse Project Reviewer
Hello Watson, The Task asking to override the add_item() function, when you call super(), it is not necessary to override the init() funtion, with super you can override any function from the parent class
Of course for this you need to create an add_item() function in the child class to in order to be able to override the parent method
What you tried it's the init() method but the quiz doesn't ask that. Another thing in the future when you overide a buildin function or magic method, you should use "_" in both sides
otherwise if you let just the first 2 "__" that will create a protected method or variable if you use for variables
__name of the function or variable
I hope it was for your help. Happy coding.