Python OOP Tutorial 4: Inheritance – Creating Subclasses

///Python OOP Tutorial 4: Inheritance – Creating Subclasses

Python OOP Tutorial 4: Inheritance – Creating Subclasses

FavoriteLoadingAdd to favorites

In this Python Object-Oriented Tutorial, we will be learning about inheritance and how to create subclasses. Inheritance allows us to inherit attributes and methods from a parent class. This is useful because we can create subclasses and get all of the functionality of our parents class, and have the ability to overwrite or add completely new functionality without affecting the parents class in any ways. Let’s get started.

Python OOP 1 – Classes and Instances –
Python OOP 2 – Class Variables –
Python OOP 3 – Classmethods and Staticmethods –
Python OOP 4 – Inheritance –
Python OOP 5 – Special (Magic/Dunder) Methods –
Python OOP 6 – Property Decorators –

The code from this video can be found at:

✅ Support My Channel Through Patreon:

✅ Become a Channel Member:

✅ One-Time Contribution Through PayPal:

✅ Cryptocurrency Donations:
Bitcoin Wallet – 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet – 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet – MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot

✅ Corey’s Public Amazon Wishlist

✅ Equipment I Use and Books I Recommend:

▶️ You Can Find Me On:
My Website –
My Second Channel –
Facebook –
Twitter –
Instagram –

#Python

source

By |2019-12-23T00:42:54+00:00December 23rd, 2019|Python Video Tutorials|22 Comments

22 Comments

  1. Chris Bishop December 23, 2019 at 12:42 am - Reply

    My mind is fucking blow to bits right now this is awesome

  2. Hua Shi December 23, 2019 at 12:42 am - Reply

    One question. Does a data scientist need to know OOP ?

  3. Joe December 23, 2019 at 12:42 am - Reply

    OMG you don't have an Indian accent!

  4. ALIAS_one11 De Papel December 23, 2019 at 12:42 am - Reply

    Everything works in python 3.7.5, I just keep getting the None word coming up when i add dev1 & dev2 to the last argument call. Followed your updated video going through the comments. Just followed the link with the datetime example. Im fine with the None being there and i understand what your doing to a point but this one concept out of all the videos in this tutorial is very C++ like & im sure there has to be in 2019, a simpler solution. Love the free video series. So thank you very much for it. Your an amazing teacher. 😉

  5. Manak Upadhyay December 23, 2019 at 12:42 am - Reply

    If teaching is an Art, this guy is the Picasso of it.

  6. Torment December 23, 2019 at 12:42 am - Reply

    Your videos are so great that i watched them before class and then my professor reccomended your videos as extra practice…. already way ahead of you, professor

  7. Elias Maalouf élève December 23, 2019 at 12:42 am - Reply

    ur a god

  8. Yeezy December 23, 2019 at 12:42 am - Reply

    I don't get the list=None part in the constructor for Manager. What does it do ?

  9. zoro juro December 23, 2019 at 12:42 am - Reply

    superb tutorial

  10. Pranay Nalawade December 23, 2019 at 12:42 am - Reply

    Why do you write employees=None under the manager class?

  11. Codi H.Merhi December 23, 2019 at 12:42 am - Reply

    I'm surprised there's no Wikipedia article about you.

  12. Praveen Thuyamani December 23, 2019 at 12:42 am - Reply

    super().__init__(fname,lname,pay)

    TypeError: super() takes at least 1 argument (0 given)
    What will be the solution? @ 9.37

    But it works for Emp.__init__(self,fname,lname,pay)

  13. M. W. December 23, 2019 at 12:42 am - Reply

    crisp

  14. Dennis Asamoah December 23, 2019 at 12:42 am - Reply

    Thank God , i found you

  15. cnh007 December 23, 2019 at 12:42 am - Reply

    Loved the video and Corey's amazing articulation, as always !
    Can Corey or someone else point me to the video why default values should not be a mutable data type
    def __init__(self, name, pay, employees=[])
    TIA

  16. navjot mannan December 23, 2019 at 12:42 am - Reply

    You have a gift 👏🏻

  17. linda ph December 23, 2019 at 12:42 am - Reply

    Amazing! Thank you again!

  18. SACHIN SOMAN December 23, 2019 at 12:42 am - Reply

    not all heros wear a cape

  19. Mobil Konto __Free__ December 23, 2019 at 12:42 am - Reply

    Making the a female name the manager made me downvote. Feminism has destroyed too much.

  20. XL December 23, 2019 at 12:42 am - Reply

    I think this is not working?
    def print_emps(self):

    if emp in self.employees:

    print('–>',emp.fullname())

  21. Nishant Thakur December 23, 2019 at 12:42 am - Reply

    The only tutorial that always keeps me awake..
    Thankx a lot for your efforts.

  22. Mani sood December 23, 2019 at 12:42 am - Reply

    Please make udemy course whichi is indepth and is long.

Leave A Comment

*