Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Can I get some hints if I am doing this the right way, it gives me a TypeError, that it expects 1 argument but 0 were given.What arguments ? Isn't list the argument that it wants ?? what excatly does len do ? And why do we use super() here, there is no parent class here, so what excatly are we inheriting from? Thanks in advance !
class Liar(list): def __len__(list): return super().__len__(list) + 4
Mark SebeckTreehouse Moderator 29,770 Points
Don't forget self and don't need any arguments in the return len
class Liar(list): def __len__(self): return super().__len__() + 4