Why "super().__init__()" one argument less than the "base class.__init__()" ?? | Sololearn: Learn to code for FREE!

+2

Why "super().__init__()" one argument less than the "base class.__init__()" ??

The question related to the below code https://code.sololearn.com/c7wL49kmf8j9/?ref=app

7/9/2020 6:20:24 PM

Hari Krishna Sahu

1 Answer

New Answer

+5

That's because self is an implicit argument. instance.f() internally gets converted to class.f(instance). For a detailed explanation read this: https://code.sololearn.com/ce664AekBveN/?ref=app