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

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

Join the Python Army to get access to perks!

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.

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

Resources:

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

Follow me on social media!

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

Today’s merch!
Creator: @ChilledCow

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

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

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

Video timeline!
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


Thanks for watching! Please consider liking & subscribing if you enjoyed this video :).

KeithGalli
Автор

I had lots of trouble understanding classes. I watched no less than 5 videos and went through many sites and this video really helped me to understand. Great job!

johnwu
Автор

I've always struggled to understand the usefulness of classes, and this video communicated it really well with great examples. Thanks for always producing quality content!

moniquemarshall
Автор

I’ve just returned to programming. I grew up in the 1970s/80s programming an old TRS-80 in basic. I’ve just started learning Python and have been struggling with classes, so, thank you. Your video and style of teaching was excellent and I finally think I can understand now.

kevy
Автор

These days when I am looking for a lesson, I always have to include in the search '...by keith' and even if don't YouTube brings your videos first because they know my preference!. Such a great teacher, I have followed through many of your lessons decided to shout out on this one. Keep being on fire.

samkons
Автор

This was really handy! Between a 5 hour "Nana" Python tutorial I watched earlier and this, I have a greater understanding of OOP than I have had for the past 15 years of off-and-on reading of programming books trying to grasp it.

FreihEitner
Автор

I did not understand classes at all until watching this. You did what my university lecturer couldn't. Thanks a bunch!

greg_
Автор

I already knew most of this stuff, but you teach so well that it was really nice watching this video!

ikki
Автор

I have built a couple of basic classes but I’m writing one to auto do a bunch of freq calcs that is a lot more complicated. 10min into your vid and I finally got a work in progress. Thank you!

jessegreer
Автор

After learning Python via SoloLearn and having to struggle through their horribly designed lesson on OOP for Python, this tutorial was an amazing help at actually understanding OOP.

nicholas-ewing
Автор

Man, you're saving my days! I want to make a snake game in python and saw some tutorials on the ytb and found nothing that i could totally understand. Then I saw you Python Game Tutorial and learned so much! Besides that, I saw you GUI tutorial and learned so uch about Tkinter too. So, thank you so much and continue doing this awesome job! Regards from Brazil

ferdinandolongoni
Автор

Hey Keith! Amazing video. I found this video because I wanted to truly understand the basics of classes and you did such a great job of explaining it in a simplistic way. Not to mention showing off some cool visual libraries! Looking forward to see what other videos you have.

jeremycollier
Автор

You're a great teacher. Thank you so much :) You'll def. know how classes work in Python after watching this!

brijpathak
Автор

One of the best explanations of oop. Thank you! Love the way you get enthusiastic when talking about sub classing around 24' :D So nerdy

hanqie
Автор

This was one of the best videos i have seen on python classes. Thanks a lot for sharing

VinodKRamachandra
Автор

i´ve see a lot of videos about this issue in youtube, and your video it´s the best. greetings from spain!! keep going!

frankcasanova
Автор

This channel is underated af . Great work my guy !

MrRadzor
Автор

My unviersity/college teachers just gave us a debugging assignment with all __init__, subclassing too and I was so confused, this was very helpful

muftizyo
Автор

I usually see examples of people who use the Name, age class. This one is much better because you actually do one that's much harder but you explain it so well. Thank you so much for this video.

tuckerboan
Автор

Great video!
Can you do a 'solving real world data science problem'-video using classes?

osezeestheriyore
visit shbcf.ru