Hi everyone.
Welcome back.
In this lecture we will talk about multiple inheritance multiple little inheritance like single or one
time inheritance.
But we will make our class inherit from more than one class.
For example if we have a class called fruit which contain Jeff and it may sound self and season and
color set for that season equals season sell for that color equal color and the class fruit name def
and it
self and the name self for the name equal.
Name and we have another class called citrus fruit which will inherit the arguments and instances from
the first and second classes which called fruit and the fruit name.
Jeff and it self and season and the color and the name which are the instances of our last classes SubA.
We will use solvers as we used an early lecture of our course about Single inheritance or one time in
inheritance or a class inherit from another one class only solver.
Double underscore and it double underscore self and season on the color super dot underscore a double
underscore in it on the double underscore self and the name and we will add the rubber.
Method will which will take a self and instance to print out our any senses return.
F citrus fruit self disease on self-esteem and self colors.
This is try to run our code.
Then we will create an object called fruit one equals citrus fruit.
Winter for season lemon for name yellow for colors.
We will get type error.
Why.
Because in Single inheritance or one time inheritance we use super.
But we can use super in multiple inherit which we will make our class citrus fruit will inherit instances
and the album is from glass root and the glass fruit name so we will use the class's names as follows.
Class citrus fruits fruit and fruit name.
Yes double underscore and it double underscore safe and seasoned and the colour and the name fruit that
under double underscore and it double underscore surf season the color fruit double underscore in it
double underscore self and the name.
Then we will add our rubber class to bring out our instances.
This is always is good.
Then we will create our object as we created last time.
Then we will call that it's our roots.
We will get that sense as soon as the mean of our class or the name of our class and when we run our
object fruit one we will get citrus fruit.
Winter yellow and lemon.
Hope you enjoy this lecture.
Thank you for watching.
See you next lecture.
Bye bye.