Python OOP Tutorial 3: classmethods and staticmethods

  Рет қаралды 1,560,299

Corey Schafer

Corey Schafer

Күн бұрын

In this Python Object-Oriented Tutorial, we will be learning about classmethods and staticmethods. Class methods are methods that automatically take the class as the first argument. Class methods can also be used as alternative constructors. Static methods do not take the instance or the class as the first argument. They behave just like normal functions, yet they should have some logical connection to our class. We will look at some examples of both of these in order to understand both in depth. Let's get started.
Python OOP 1 - Classes and Instances - • Python OOP Tutorial 1:...
Python OOP 2 - Class Variables - • Python OOP Tutorial 2:...
Python OOP 3 - Classmethods and Staticmethods - • Python OOP Tutorial 3:...
Python OOP 4 - Inheritance - • Python OOP Tutorial 4:...
Python OOP 5 - Special (Magic/Dunder) Methods - • Python OOP Tutorial 5:...
Python OOP 6 - Property Decorators - • Python OOP Tutorial 6:...
The code from this video can be found at:
github.com/CoreyMSchafer/code...
✅ Support My Channel Through Patreon:
/ coreyms
✅ Become a Channel Member:
/ @coreyms
✅ One-Time Contribution Through PayPal:
goo.gl/649HFY
✅ Cryptocurrency Donations:
Bitcoin Wallet - 3MPH8oY2EAgbLVy7RBMinwcBntggi7qeG3
Ethereum Wallet - 0x151649418616068fB46C3598083817101d3bCD33
Litecoin Wallet - MPvEBY5fxGkmPQgocfJbxP6EmTo5UUXMot
✅ Corey's Public Amazon Wishlist
a.co/inIyro1
✅ Equipment I Use and Books I Recommend:
www.amazon.com/shop/coreyschafer
▶️ You Can Find Me On:
My Website - coreyms.com/
My Second Channel - / coreymschafer
Facebook - / coreymschafer
Twitter - / coreymschafer
Instagram - / coreymschafer
#Python

Пікірлер: 1 100
@user-xc5xf8gp8n
@user-xc5xf8gp8n 4 жыл бұрын
Summary: In this video, Corey distinguishes between a regular method, class method, and a static method. Firstly, a regular method is the type of method that we are used to seeing since the start of OOP tutorials. It is accessible through both the class and the instance, which means that we can call for the method in both Employee.method() and emp_1.method() they automatically have the instance as the first positional argument, as self. Secondly, class methods are the type of method used when a method is not really about an instance of a class, but the class itself. To create a class method, just add '@classmethod' a line before creating the class method. The class is automatically the first argument to be passed in, and is represented as 'cls' instead of 'class'. This is because 'class' is already assigned to be something else in Python. There are 2 ways of using the class method as far as Corey has shown. First is modifying the class variable. Corey modified the 'raise_amount' class variable using a class method. Just remember that to access a class variable, we have to write 'cls.' before specifying the actual name. For example, as 'cls.raise_amount' as in the video. Second is making an alternative constructor. Sometimes people have information of their specific instances of the class available in a specific format. Corey shows an example of this where first and last names and pay are separated by a hyphen. Corey creates a class method that returns the class with the specific values passed in that are obtained by using split() method to the string passed in. User of the script can now automatically create a new instance without having to parse the string at '-'. Corey then moves on to cover static methods. Static methods are different from regular methods an class methods in that it doesn't have a class or instance that is automatically passed in as a firs positional argument. They can be created by adding '@staticmethod' a line before defining the method. These are methods that have a logical connection to the Class, but does not need a class or instance as an argument. Corey says that it is better to make sure we create a static method rather then class or regular method when we are sure that we don't make use of the class or instance within the method.
@vicstan5983
@vicstan5983 4 жыл бұрын
Keep up the good work! Read all your post so far
@luxfero9272
@luxfero9272 4 жыл бұрын
Can I conclude that the need to create class method instead of class variable is that modifying the 'raise_amount' can be done outside the Class Employee (in class method) by writing the namespace cls.raise_amount(1.05) but in class variable, we should modify from the Emloyee class itself? That's why we need class method for things that we should/can change without modifying the class coding. To keep it clean?
@egehurturk6209
@egehurturk6209 4 жыл бұрын
Not all heroes wear capes, MAN YOU ARE GREAT
@thinhnguyenvan7003
@thinhnguyenvan7003 4 жыл бұрын
yeah, but sometimes i see some source codes. static method have self as parameter
@ToriKo_
@ToriKo_ 3 жыл бұрын
Your writing is very clear and helps me understand the video, thank you man
@ankitdhungana6181
@ankitdhungana6181 4 жыл бұрын
At least have some ads. You are too good to handle. I'm feeling guilty for watching these videos for free.
@steveymcneckbeard
@steveymcneckbeard 4 жыл бұрын
😂 for real!
@bwatspro
@bwatspro 4 жыл бұрын
So donate, you cheap fuck.
@connorgaughan4984
@connorgaughan4984 4 жыл бұрын
@@bwatspro lmao
@balmukundthapa4302
@balmukundthapa4302 4 жыл бұрын
Knowledge should be free of cost.
@bwatspro
@bwatspro 4 жыл бұрын
@@balmukundthapa4302 Do you understand the concept of "donation" ? It doesnt conflict logically with "price" of knowledge, which is non-zero, by the way (production cost, +"lost opportunity" in economic sense) Anyway, I was just playing when I wrote my original response.
@nishantnavade7590
@nishantnavade7590 4 жыл бұрын
He actually knows what to teach, Unlike most of paid courses.
@sathishmurugesan1732
@sathishmurugesan1732 8 ай бұрын
agreed
@jmeib
@jmeib 7 ай бұрын
Yep, I bought the Code with Mosh python course and in it he does a terrible job explaining classes.
@kushkaul
@kushkaul 7 жыл бұрын
I paused at 1:17 to checkout video on Decorators which I paused again to checkout video on Closures which I paused, yet again to checkout video on First Class Functions. Glad, I did. Thanks for the awesome videos.
@coreyms
@coreyms 7 жыл бұрын
Haha. Sorry for the rabbit hole there. Seems like some of these things can continuously break down into smaller and smaller topics. Glad you enjoyed them though!
@shreerangaraju1013
@shreerangaraju1013 7 жыл бұрын
I did the same thing lol
@ingomolitor9796
@ingomolitor9796 7 жыл бұрын
ilyas khlifa kerfa unindent the 'return true' by on level
@kushkaul
@kushkaul 7 жыл бұрын
Sorry can't understand but if I had to guess, use 'return True' & 'return False' instead of what you're using. class Employee: def __init__(self, first, last, pay): self.first = first self.last = last self.pay = pay @staticmethod def is_workday(day): if day.weekday() == 5 or day.weekday() == 6: return False return True emp_1 = Employee('corey', 'shafer', 5000) emp_2 = Employee('test', 'Employee', 6000) import datetime my_date = datetime.date(2016, 7, 11) print(Employee.is_workday(my_date)) True >>>
@ilyasbenk7324
@ilyasbenk7324 7 жыл бұрын
thanx a lote ser i m greatful
@nackyding
@nackyding 6 жыл бұрын
I'm broke right now but your tutorials are helping pave the way for me to get out of this situation. Once I get back on my feet I'm going to send some loot to your patreon. Thank you for teaching. These are awesome tutorials.
@coreyms
@coreyms 6 жыл бұрын
Thanks! And I can definitely understand money being tight. I don't want anyone supporting outside of their comfort zone. I'm glad to hear you're finding the videos helpful.
@pardesi_swiss
@pardesi_swiss 6 жыл бұрын
Man your comment inspired me to check my bank account once a while ! :)
@prabhakarkevat6846
@prabhakarkevat6846 5 жыл бұрын
What condition are you in now?
@MMABeijing
@MMABeijing 5 жыл бұрын
Hi Max, I am the Internet and I am here to keep you accountable, can you give an update on your situation? Seriously
@aimethierry6413
@aimethierry6413 5 жыл бұрын
@@@MMABeijing hahahhahaha
@sudarsandm
@sudarsandm 6 жыл бұрын
Hey Corey, You are awesome. I see the hard work you have put through these videos and sharing the fruits of your effort with us.
@zenosgrasshopper
@zenosgrasshopper 4 жыл бұрын
Corey, thank you for putting links to each part of the series in all of the video descriptions. It saves time and frustration, so I really appreciate that!
@bmanishap
@bmanishap 4 жыл бұрын
Very nice explanation. Thank you very much !!!
@Land-management-system-bd
@Land-management-system-bd 4 жыл бұрын
I cann't imagine you make this tutorial free for public. This is the best videos over the internet I think. Thank you man. You are great.
@AydinCGur
@AydinCGur Жыл бұрын
When I was a beginner, I have watched this video and I learned a couple of things. Now that I have intermediate skills, I see the depth and beauty of this video clearly. I feel like I truly grasped this concept. Thanks Corey!
@khoitrinh8009
@khoitrinh8009 6 ай бұрын
Agree, after spending whole a year of learning from different sources. I just realized how the depth and beauty of this video
@codecobber1107
@codecobber1107 6 жыл бұрын
Absolutely superb! The videos on OO are clear, precise and easy to understand. Thanks Corey. I plan on watching (and learning more from) all your videos
@prathamva7392
@prathamva7392 7 жыл бұрын
you have a very firm and clear voice....it pulls my concentration : )
@richardhowlin6048
@richardhowlin6048 4 жыл бұрын
Easily the best explanations of Python concepts on any platform ( KZfaq, Udemy, Code with Mosh etc.) Corey has a great ability when explaining something to stay within the scope of the topic. By that i mean he doesn't mentioned anything that would be unfamiliar to someone at that particular level. I've found tutors will throw in advanced topics at a very early stage and throw you complete off. Another helpful aspect of Coreys tutorials is his naming of variables/methods/classes and concepts within code. I've found that tutors will name these similar to the concept they are explaining which has lead me completely misunderstand a subject. I really appreciate your tutorials.
@gamerforever9137
@gamerforever9137 2 жыл бұрын
It has been 5 years, since you uploaded this video, and I bet their is still no video or teacher that explain me this topic better than you have. You are the best!!!
@ZsoltPal23092011
@ZsoltPal23092011 Жыл бұрын
A year on and that is still the case. These tuts are simply the best overall - clear up soo much of the confusion.
@goldboxhunter9376
@goldboxhunter9376 Жыл бұрын
@@ZsoltPal23092011He's back :D
@JR-gy1lh
@JR-gy1lh 2 ай бұрын
still watching your videos in 2024. Fantastic teacher!
@shazkingdom1702
@shazkingdom1702 5 жыл бұрын
Hi Corey, you're a great teacher and everything makes sense.. for some reason I came across with your tutorials and it was a blessing. After 3 videos I am hooked and all shook'd up! - It's like watching a TV series "I’m addicted".
@nackyding
@nackyding 6 жыл бұрын
BEST python tutorials on KZfaq by far, hands down! And I'm not being hyperbolic.
@RajeshGoyalg
@RajeshGoyalg 7 жыл бұрын
Must watch python videos. Thanks Corey.
@ShalabhBhatnagar-vn4he
@ShalabhBhatnagar-vn4he 4 жыл бұрын
Your class is permanent Mr. Corey. Thanks for summing up in few minutes what many pages of books struggle to! Cheers!
@anirudhi21
@anirudhi21 5 жыл бұрын
Your tutorials are magic. They went straight into my head.
@gauravreddy4599
@gauravreddy4599 6 жыл бұрын
Thanks a lot Mr.Schafer. I couldnt understand one bit when my teacher taught the same. Thanks to you, I've got a fair idea about oop.
@williamkarlsson408
@williamkarlsson408 6 жыл бұрын
You are without a doubt whatsoever the best at teaching this that I have ever come across!
@svenstehle9438
@svenstehle9438 4 жыл бұрын
Wow Corey, your tutorials are amazing. Please continue doing a lot of them you are doing an awesome job! I always struggled to understand OOP concepts in python even with help from various articles and courses that touched on the subject. Now that changed. Not only do I know how, but also WHY to use which type of method or variable. And it's all packed in short and easy to follow videos and reproducible code
@novicetech1
@novicetech1 6 жыл бұрын
Hi Corey. Another fantastic tutorial. This one was a bit tougher for me because none of the previous tutorials I viewed on this subject went into such exquisite detail. I finally understand this.Thank you so much for your generosity and expertise. You are awesome!
@akshaybhardwaj10
@akshaybhardwaj10 5 жыл бұрын
That was beautiful. Such simple and succinct explanation. I have wasted almost 2 hours trying to understand this by reading and nothing I read helped me as much as this video.
@thatonenerd1568
@thatonenerd1568 4 жыл бұрын
Explained in much more concise detail than several of the paid programming course websites out there. Keep up the good work
@cubeow1
@cubeow1 4 ай бұрын
dude, this is like the best tutorial out there. I've been trying to understand class methods, and I've just been confused at how other people have taught it, but Corey Schafer's beginner friendly way of teaching and his way of just explaining all the little things just helped me clear out a lot of the rubble for me.
@saimunhassan4112
@saimunhassan4112 4 жыл бұрын
Wow! You explain the concepts so clearly. Love how you distill complex concepts into simple ones.
@unixplus
@unixplus 5 жыл бұрын
Better than what our company bought ,licensed materials.
@josephbatish9476
@josephbatish9476 7 жыл бұрын
Corey Schafer you are amazing man big big thank u
@carljason4299
@carljason4299 4 жыл бұрын
The way you explain everything crystal clear gives me goosebumps.
@TheDavidAlexander
@TheDavidAlexander 4 жыл бұрын
You are a brilliant teacher - I'm reviewing even introductory classes and getting a whole new deeper understanding of the subjects - Keep it up - you were born to do this!
@thesanityofjonnywalker6526
@thesanityofjonnywalker6526 7 жыл бұрын
gaaaaah seriously you are the best teacher. So clear and efficient!!! Thank you so much for these.
@alphamusicbar
@alphamusicbar 5 жыл бұрын
Best Python tutorial ever !
@havenselph
@havenselph 4 жыл бұрын
These videos helped me understand class objects around a year and a half ago and now I am back trying to find a specific part I don't remember well. Thanks for the great content, it's very memorable and helpful!
@marksahlgreen9584
@marksahlgreen9584 5 жыл бұрын
Great job with your Python videos, so far i've seen the basics and the OOP playlists, among some other Python things in the last 4 days, and I feel like I can go out and write Python just as well as I can write Java (with a few years of experience), which is a blast, since I was looking for this kind of precise learning! Good job, keep it up!
@juneseif
@juneseif 7 жыл бұрын
Your python tutorials are the best
@coreyms
@coreyms 7 жыл бұрын
Thanks, June! Glad you found them helpful :)
@jack_s
@jack_s 5 жыл бұрын
I tried to learn the class concept several times from tutorial videos. This is the first time I really feel I got it right. Thanks.
@stevepaul1707
@stevepaul1707 3 жыл бұрын
this is seriously hands down best OOP tutorial i have ever seen
@munyafiction
@munyafiction 7 жыл бұрын
Straight to the point, clear, concise - it's a yes from me.
@sanaullahkhanhassanzai8432
@sanaullahkhanhassanzai8432 5 жыл бұрын
This was wonderful. Thoroughly enjoyed. I had a lot of confusion about static and class methods and ended up watching many tutorials. None of them was as good as this. You are simply brilliant. Keep up the good work. Thank you so much for the videos. stay blessed.
@nurshah816
@nurshah816 5 жыл бұрын
I learned a lot from your tutorials and once i get a job as a Py dev, i will contribute for sure. thanks again for great video.
@user-td3fb4rm5d
@user-td3fb4rm5d Жыл бұрын
Man, you are so articulate. The way you express and articulate the concepts is perfect. I write every word you articulate as definitions of my lines of code.
@bharadwajsaibandaru4323
@bharadwajsaibandaru4323 3 жыл бұрын
Hey Corey ! . You are a master of Python. I have recommended your python playlist to all of my friends who asked me . Perhaps the best Python tutorials on You Tube ever seen. Thank you for providing us such intense knowledge. Kudos for you .
@juliusarceo3800
@juliusarceo3800 5 жыл бұрын
I am completely stuck on this specific topic for a Python course I am taking. This is the third video I've watched and I must say that your ability to explain these concepts is awesome. Thank you sir!
@sebastianlunaalonso256
@sebastianlunaalonso256 7 жыл бұрын
Me: "It's early, let's watch 1 more video from Corey" Ended up with 4 tabs on Chrome and 1 hour of material to watch. Good job there Corey haha.
@flo1123
@flo1123 3 жыл бұрын
The video was way easier to understand than all the other sources I originally came from, even without watching the other parts of the series. Thank you very much!
@ashxia
@ashxia 4 жыл бұрын
you are better than 2 weekends in a row .. thanks man .. u know iv been trying to understand this from different sources and i couldnt really grasp the whole concept ,,,now that im watchin ur videos im so impressed, the lesson is short ,clear and straight to the point, its to sophisticated ,, thanks
@surajpoojari5182
@surajpoojari5182 Жыл бұрын
How can you be so clear with your explanations no confusions❤
@mustaphag
@mustaphag 7 жыл бұрын
Thanks a lot of these Excellent Videos. Keep the good job
@mikem8915
@mikem8915 5 жыл бұрын
Outstanding videos. I've watched the first few of this series. Clear crisp examples and explanations. Love it.
@hongren99
@hongren99 6 жыл бұрын
Thank you so much. Theses videos are the best in KZfaq for python. It is very clear, has nice voice and no extra nonsense staff. Great staff!
@manuelch4589
@manuelch4589 4 жыл бұрын
Excellent tutorials. I am new to python but i am getting better watching your videos. Thanks you
@artmcclure637
@artmcclure637 7 жыл бұрын
Your videos make more sense and are easier to understand than anybody else!
@adampajda3204
@adampajda3204 6 жыл бұрын
I agree with you!
@wobsoriano
@wobsoriano 6 жыл бұрын
Art McClure other people just make videos blablabla without explaining what the heck they are doing. There's this guy in youtube name TM and he's not even explaining what modules he is importing
@larryguo2529
@larryguo2529 6 жыл бұрын
Can't agree more !
@metasploitation7847
@metasploitation7847 4 жыл бұрын
This really a good explanation. Being consistent with your methodology against known examples such as the datetimemodule (9:20) reinforces the learning experience. Thank you Corey.
@jharris4854
@jharris4854 4 жыл бұрын
I have understood more about classes in your first two videos than in my entire time in college....thank you for explaining things so clearly!
@Indraw705
@Indraw705 7 жыл бұрын
Very awesome video you have shared thanks buddy
@kickbuttowsk2i
@kickbuttowsk2i 4 жыл бұрын
2020 update: this playlist should be preserved
@danielpolach9821
@danielpolach9821 5 жыл бұрын
Clear-cut, short and nice. Not every tutorial is like that. Good work.
@imemir
@imemir 4 жыл бұрын
I really can say that after many tries to learn python finally I got many concepts thanks to you. Bravo!
@umerchohan3468
@umerchohan3468 5 жыл бұрын
OOP is no more remained difficult after watching these. No doubt, lot of hard-work is done for making these master piece tutorials and hard-work always pays.
@adrien_chauvet
@adrien_chauvet 7 жыл бұрын
Man, your pedagogy is excellent. Thank you very much!
@zes7215
@zes7215 5 жыл бұрын
ts not imporx or not, no carex nmw, nonex
@centurion8158
@centurion8158 4 жыл бұрын
I'm amazed by how easy you make this topic to be understandable for everyone, back in the day i didn't manage to understand what could i do with these, these are top tier explanations, thank you
@see576
@see576 3 ай бұрын
I really appreciate you mentioning the common mistakes that people usually make
@leonbass3275
@leonbass3275 5 жыл бұрын
You've made classes so simple, I wish that i'd watched this series earlier instead of putting off learning about classes
@serounon09
@serounon09 7 жыл бұрын
Your videos are awesome thanx a lot!
@chiky1007
@chiky1007 4 жыл бұрын
Man, I never understood classes and their use until I came across your videos.. They are so easy to understand and you are like the best teacher ever..... Thanks for all your efforts and thank you for these videos.
@prettyu4
@prettyu4 4 жыл бұрын
i was struggling to learn class from ebooks and some other pdf but luckily found your channel , thanks alot for clearing all initial doubts like instance , self , attribute , methods and all ,
@VivekKumar-wm9jo
@VivekKumar-wm9jo 7 жыл бұрын
Really ..best one .. :)
@sherafati
@sherafati 4 жыл бұрын
I can't believe you've answered every single question that came to my mind while watching this vide. Best OOP explanations ever!
@abs8090
@abs8090 4 жыл бұрын
I like the examples you used and great explanations. THANKS
@mahithchigurupati7979
@mahithchigurupati7979 3 жыл бұрын
Seriously Corey. you are the best. have been through a lot of youtube videos and even udemy course. no one explained things the way you did that too absolutely free. Thank you so much
@pyb.5672
@pyb.5672 6 жыл бұрын
Hi Corey, I noticed a small mistake at 5:46. When you split the string, you create new strings including the pay variable. If you were to execute the apply_raise() function on that new_emp_1 variable, the function would try to multiply a float by a string, getting an error. We need to convert that string to an integer So that line 34. should read: new_emp_1 = Employee(first, last, int(pay)) Same goes for the subsequent from_string classmethod created using the same way. Great videos by the way, I am learning tons!
@d.madureira
@d.madureira 5 жыл бұрын
Or better yet, you could always check if the payment is a number in the constructor, as it is one of the uses of a constructor, that way you would always have a number no matter how you instantiated it.
@jack_s
@jack_s 5 жыл бұрын
@@d.madureira Hi Can you please show the code how to checking number in the constructor?
@muzi5366
@muzi5366 5 жыл бұрын
@Daniel Mad please share the code
@muzi5366
@muzi5366 5 жыл бұрын
@@d.madureira Please share the code
@jjjbushjjj1
@jjjbushjjj1 5 жыл бұрын
@@muzi5366 Looks like self.pay = int(pay)
@Ammothief41
@Ammothief41 5 жыл бұрын
apply_raise -> self. I like the sound of that!
@zhilee4303
@zhilee4303 6 жыл бұрын
Thank you Corey Schafer for you did so much work in this tutorials, I learn a lot from it.
@aerospacewithcode8852
@aerospacewithcode8852 3 жыл бұрын
Hi Corey, I really appreciate you recording those videos that help us so much in learning python and programming in general. I am a better person due to watching your videos, it somehow gives me peace when I am learning something.
@wertuxhd6201
@wertuxhd6201 3 жыл бұрын
Hello Corey.. I am a python developer for a close time.. And I have developed many games with pygame, created mini blog, set up sockets and played multiplayer games.. And also deep learning in every section of it.. What I want to say is that.. Untill now, all I could improve after learning classes, was to know the libraries which is also important for me but.. These tutorials are just really enchanced me at the same time I was telling myself what am I missing with python.. I have discovered this channel just 30 mins ago and you are better than anyone I have seen in 5 months.. it is amazing that in the third video you are telling classmethods with a really clear way. This is god level dude. I learned classes coding games.. By teaching myself, because other tutorials were really complicated but this is what I had to see.. i know written a lot, just amazedd
@wertuxhd6201
@wertuxhd6201 3 жыл бұрын
Also sorry for this bad english :D.. keep up you are my new teacher thanks a lot
@mahteenbash
@mahteenbash 4 жыл бұрын
My jaw literally dropped when I understood the part when you used the class method as an alternate constructor.
@cwill1337
@cwill1337 4 жыл бұрын
I know this video has been out for a few years, but I wanted to let you know it is still helping new programmers. I was having a problem with some code that I am writing for college homework and this video helped me solve that problem. Thank you for making these great videos.
@jasonmartin9359
@jasonmartin9359 6 жыл бұрын
Watching this in 2017... Thanks for getting straight to the point and explaining why each section is useful/important!
@hp131
@hp131 5 жыл бұрын
Regular Class automatically pass the instance as the first argument and we call that "Self" Class Method automatically pass the Class as the first Argument and we call that "CLS" Static Method don't pass anything automatically and they don't pass instances and or the class
@etbilu6265
@etbilu6265 5 жыл бұрын
thanks ! good resume.
@kannanv8831
@kannanv8831 4 жыл бұрын
Thanks for one liner.
@chuckmaddox6725
@chuckmaddox6725 4 жыл бұрын
@@kannanv8831 3 lines actually :)
@jeff_mci_gaming6018
@jeff_mci_gaming6018 6 жыл бұрын
heh..im on the subway listening to this video...looking forward to goin home and messing around with this..thnx
@TW-uk1xi
@TW-uk1xi 4 жыл бұрын
The best explanation so far on the planet. I'm gonna give my best contribution to you for making the best tutorial.
@vitaly_p
@vitaly_p 2 жыл бұрын
Thank you very much! Great and comprehensive explanation!
@fallendeacon
@fallendeacon 5 жыл бұрын
I've been doing just hobby Python stuff for the last year, and my only experience was coming from scripting in video games (like pixel bots for Diablo II etc) as a kid. I can do some really amazing things that quickly turn into 1500+ lines of global functions + if statements and list iterations, but man I would have saved myself a TON of time and confusion over bugs if I had seen your class videos! Great work.
@klayverpaz
@klayverpaz 4 жыл бұрын
I wish I had a corey for every other subject of my life...
@eatdapoopoo67
@eatdapoopoo67 3 жыл бұрын
yes Corey, please make some dating advice videos of this caliber!
@roryderrick8461
@roryderrick8461 2 жыл бұрын
Thanks Corey for the thorough explanation. I'm learning Python and have seen many tutorials on classes but not with this clarity.
@kapilag
@kapilag 3 жыл бұрын
Hey Corey - I hv to say that you are amazing at explaining concepts way better than many other paid courses on Udemy, edX, Coursera and all those big platforms. I think the detailed walkthrough via examples are super useful
@tchoutangbankouemichelfran5386
@tchoutangbankouemichelfran5386 5 жыл бұрын
you are really methodic & you move step by step!! i'm grateful because your videos have sharpenned my skills a lot!! cheers dear
@mahmoudmohsen6456
@mahmoudmohsen6456 2 жыл бұрын
Phenomenal explanation! Simple and clear! Thank you so much for these brilliant videos!!!
@mariodakhil7805
@mariodakhil7805 4 жыл бұрын
this tutorial is the best one about python oob on youtube , i really need it thank you
@IamKhoramdin
@IamKhoramdin 2 жыл бұрын
After all these years, i still use your tutorial. thank you again
@basetroll1627
@basetroll1627 2 жыл бұрын
Your tutuorials are just fantastic. It all gets clearer and clearer about OOP! Thanks a ton! I
@ArminiumII
@ArminiumII 3 жыл бұрын
You are the best teacher ever! Clear, brief and correct! Like and subscription!
@larryguo2529
@larryguo2529 6 жыл бұрын
I looked for OOP, design pattern tutorial, but none is as good as yours. !! I started from tutorial 1 and can't stop all the way to Tutorial 3 finished !!! TKS, YOU really rock !
@pawegrzesik4449
@pawegrzesik4449 8 жыл бұрын
Really useful. I always had a problem to understand when to use classmethod. Thanks!
@shubhambadaya
@shubhambadaya 4 жыл бұрын
Thank you Corey for the each and every videos you make
@vascoalmeida4839
@vascoalmeida4839 4 жыл бұрын
This series is my Python refresher. I think I have contributed before, but shall presently do it again. Thks, Corey.
@coreyms
@coreyms 4 жыл бұрын
Thanks!
@awdsgrgde6979
@awdsgrgde6979 4 жыл бұрын
Thank you very much. I like it how you deeply explain presented concepts. Other teachers just make it look like it's all about learning by heart.
@ninakoch1799
@ninakoch1799 3 жыл бұрын
binge watching this whole series is the best way to spend quarantine. thank you corey for your amazing content!!!
Python OOP Tutorial 4: Inheritance - Creating Subclasses
19:40
Corey Schafer
Рет қаралды 1,3 МЛН
1🥺🎉 #thankyou
00:29
はじめしゃちょー(hajime)
Рет қаралды 78 МЛН
Python OOP Tutorial 1: Classes and Instances
15:24
Corey Schafer
Рет қаралды 4,3 МЛН
5 Good Python Habits
17:35
Indently
Рет қаралды 341 М.
5 Useful Python Decorators (ft. Carberra)
14:34
Indently
Рет қаралды 83 М.
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,7 МЛН
Python 101: Learn the 5 Must-Know Concepts
20:00
Tech With Tim
Рет қаралды 1 МЛН
This Is Why Python Data Classes Are Awesome
22:19
ArjanCodes
Рет қаралды 788 М.