Kaio Nigro4,168 Points
Confused with the purpose of super()
I am a little confused as far as the purpose of the super() in the code.
When we create a class Thief(Character) isn't is supposed to inherit the method of the Character class? So wouldn't it already be getting the name from the parent class?
Isn't the point of inheritance that we don't repeat ourselves, the way I'm seeing it now just feels like I'm rewriting the code in the Thief class.
Can anyone help me understand that better? The video is not very clear to me.
Thank you Kaio
Alex KoumparosPython Web Development Techdegree Student 35,923 Points
You're not alone in having this question. I've already written quite a long explanation here.
Take a look and see if it clears things up for you. If not, I'm happy to provide further clarification.