Multiple Inheritance in Python - how to use super & __init___ to initialize python Base class

Pubblicato il: 21 settembre 2020
sul canale di: The Theory Of Code
16,671
436

This video is all about understand multiple inheritance in python because it's different that multiple inheritance in other programming languages.

In this video, I'm focused on one function called _init_ and usage of super in python. In case of python multiple inheritance it's the programmers responsibility to properly initialize the base classes and call the _init_ (i.e. the init) function. This is simple in case of single inheritance but turns out to be complicated when multiple inheritance in python comes into picture.

In case of normal python inheritance, the base class init will be call by calling python class super().__init__ but in case of multiple inheritance there are multiple ways to do the same and in this video I'm talking about the ways by which you can do the same.

Hope this video helps you in expanding your learning journey

#python #inheritance #multipleinheritance #pythonprogramming #objectorientedprogramming

Here are the contents of this video

Timecodes
0:00 - Introduction to Python Multiple Inheritance
0:42 - Understand _init_ function
1:39 - Python Inheritane for reusability
2:03 - Using super().__init__
2:56 - Super().__init__ with multiple inheritance
3:26 - Python class with multiple inheritance
5:15 - Calling _init_ of base classes explicitly
5:53 - Calling _init_ of base using super
7:50 - Python multiple inheritance with 3 base classes
8:48 - Python super().__init__ from all classes
10:07 - Python Multiple inheritance with _init_ parameters
11:38 - _init_ with **kwargs
13:46 - _init_ with **kwargs - 3 base classes

ABOUT ME -

Greetings Everyone, I am Daksh (Officially - Deepak K G). I'm a Techie with more than 20 years of work experience and I've created this channel Code Sports (also CodeSports.ai ) to share the crux of my learning with an intention to help you in your learning journey.

I'll primarily create contents on Software Development Ecosystem which will included the following

Programming Languages
Machine Learning
Cloud Computing
Databases
Working as a Team
Requirements Management
Frameworks and Estimations
Gamification Techniques

I'm also an explorer by nature and I love to discover and explore things. I'd like to share all those thing which I think is worth sharing.

Last but not the least, I' m a traveler and would like to take you with me on some of the interesting journeys around the world. Believe me there is more to learn outdoors than indoors

Hope you'll join me in my journey 🙏🙏🙏

SUBSCRIBE - https://www.youtube.com/CodeSportsAI?...
INSTAGRAM - https://www.intagram.com/CodeSportsAI

Twitter -   / codesportsai  

Facebook -   / codesportsai  


In questa pagina del sito puoi guardare il video online Multiple Inheritance in Python - how to use super & __init___ to initialize python Base class della durata di ore minuti seconda in buona qualità , che l'utente ha caricato The Theory Of Code 21 settembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 16,671 volte e gli è piaciuto 436 spettatori. Buona visione!