+ 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

9th Jul 2020, 6:20 PM
Hari Krishna Sahu
Hari Krishna Sahu - avatar
1 Réponse
+ 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
9th Jul 2020, 6:35 PM
HonFu
HonFu - avatar