Everything you need to know about Classes in Python! (Object Oriented Programming Tutorial)

Publié le: 29 février 2020
sur la chaîne: Keith Galli
194,162
6.2k

Follow me   / keithgalli   for more tech content!

Join the Python Army to get access to perks!
YouTube -    / @keithgalli  
Patreon -   / keithgalli  

Download Kite: https://www.kite.com/

In this video we overview the main things I think are pointing when you are starting to learn about classes & integrate them in your everyday code. In this video we cover:
why should we use object oriented programming (oop) ?
the basics of defining a class in python (__init__)
class methods
what the heck is "self"?
Inheritance & Subclassing
Operator overriding

A timeline is in the comments.

If there are topics you felt like I left out, let me know in the comments! I'll potentially make a follow up video to this one.

For an example of me structuring my code with classes, check out this machine learning video:   • Real-World Python Machine Learning Tutoria...  

If you want to practice using classes, try rewriting the game we build in this video to use them:   • How to Program a Game! (in Python)  

^(I'll update the github repo for that video with my solution to this soon)

Resources:
Github code: https://github.com/KeithGalli/python-...
Operator overloading: https://www.geeksforgeeks.org/operato...

---------------------

Follow me on social media!
Instagram |   / keithgalli  
Twitter |   / keithgalli  

---------------------

Today’s merch!
Creator: @ChilledCow
Website: https://teespring.com/stores/chilledc...

---------------------

Video timeline!
0:00 - Introduction
1:34 - Why use classes?
2:27 - Defining our first class in Python
6:05 - Class methods
13:53 - Passing in default keyword arguments (size of our polygons)
20:18 - Inheritance & subclassing (using the super() method)
24:43 - Class method overriding
26:06 - Plotting points with classes
28:09 - Operator overloading

---------------------
If you are curious to learn how I make my tutorials, check out this video:    • How to Make a High Quality Tutorial Video!...  


Sur cette page du site, vous pouvez voir la vidéo en ligne Everything you need to know about Classes in Python! (Object Oriented Programming Tutorial) durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Keith Galli 29 février 2020, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 194,162 fois et il a aimé 6.2 mille téléspectateurs. Bon visionnage!