Akshaan Mazumdar2,356 Points
This Video is Confusing!!!!! Why are we using super if we are defining __init__ in the subclass as well?
Why is super required in this particular case? What does it actually simplify ?
even after going through this SuperDuper video several times and doing the project work, i never got the solid foundation on the "why" I would need the super(). If you are still as confused as i was try this video by Corey Schafer, https://www.youtube.com/watch?v=RSl87lqOXDE, that covers the same topic with a different set of examples that really helped. Seeing it a different way really helped solidify for me the function of super() and how it allows "inheritance" from parent class to child and yet allowing child to build more complexity as needed.
Dave StSomeWhere19,809 Points
I think of it as you are overriding the parent class
__init__ in the subclass. Then that parent
__init__ isn't executed.
Since you don't want to recode stuff already in the parent
__init__, you use super to get the parent stuff and your subclass specific stuff in your
__init__ (so kinda sorta like doing an include).