18. Multiple Inheritance [Python 3 Programming Tutorials]

preview_player
Показать описание


Next Video:

Рекомендации по теме
Комментарии
Автор

I hope you are feeling better. It is great to have you and your incredible knowledge back. You were sorely missed!!

officesuperhero
Автор

Thanks Sir! Could you please give real time example of multiple inheritance?

shardulborhade
Автор

Why did you have to specifically call the function "skills" of Father and Mother in the Child, when the Child class has the multiple inheritance, isn't that redundant? Or is defining the Child as multiple inheritance is only to gain access to the functions of the Class Father and Mother?

Griffindor
Автор

What if base classes has skills method but child class doesn't have this method.. And we call skills method... So which class method will get executed??

abhishekpandey
Автор

May I know what is the difference between 'class class_name():' and 'class class_name:'? (with and without bracket in the class name). Thank you.

nanghtethtetaung
Автор

Instead of passing self into the parameter of the functions, i had to mention that these method functions were staticmethods and i have no idea what that meant. It wouldnt work if i go def Sports(self): like that but this seems to work :

class Father:
@staticmethod
def Sports():
print("I LOVE SPORTS")


class Mother:
@staticmethod
def Cooking():
print("I LOVE COOKING")


class Child(Father, Mother):
@staticmethod
def Painting():
print("I LOVE PAINTING")


Chris = Child
Chris.Painting()
Chris.Sports()

shreytalreja