Finally completed watching the video. Good OOP tutorial. The new thing for me was slots. We dont see they are widely implemented and probably that's why not many tutorials cover them. Again, thank you for creating this comprehensive tutorial.
I enjoyed this course very much. As a beginner I felt like this was the perfect balance between thoroughness and breadth. Of course, some of the concepts I won't be able to execute on my own nor perfectly follow their logic/sequence with complete understanding, but now I have a strong OOP framework in my head that I can slowly build upon with practice. Great teaching style too- if you release any more videos on topics I'm trying to learn I will definitely watch them. Many thanks
Great! Yes it will take time to figure out when to use what. It´s all not easy, but if you finish a course like this you seem to have the grit to to it ;-)
thanks a lot for the great video! I especially like the Design Patterns part. Just a feedback: I wish you first explained what you want to achieve with each example and then implemented the code and briefly went over why each element is necessary. For example why the super class Observer is needed. Coming from a C programming background, every problem I encounter during coding, seems like it will be solvable by functions. I never understood the real need of making classes. It would be nice to make another video going a bit deeper in design patterns part, explaining the chain of thought of "why" you choose classes for specific problems. Thanks a lot!
Thank you for your feedback. Maybe I can create a Design Patterns video in the future, where I cover this and also show "functional" alternatives with Python :)
@@codingcrashcourses8533 A more in-depth video on design patterns and best practices will definitely be appreciated! :) With some more concrete examples of when you choose each design pattern or if it's a personal choice etc.
Very interestign video one question so far: 38:00 you talk about how to add archers to company. When you add them by the + operator the company's size argument does not seem to work. Although you specify a comapny just with 5 archers, even if you add 6 the company adjusts and you never get notified that the maximum number of archers has been reached. Even when the iter and next are added if you have more than 5, they will all appear int he print. Any ideas how to correct it?
Thank you! I made a logical mistake: def __add__(self, other): if not isinstance(other, Archer): raise TypeError("Only adding Archers allowed") if len(self.archers) >= self.size: raise ValueError("Company already full") # Raise error if full self.add_archer(other) return self I also have to add the check here...
Everytime you need unique values or want to compare values, you calculate a hash. Lets say you want to store your custom classes in a set and make sure you don´t have duplicated ones. {person1, person2, person3}
There is a 2,5 hours video on OOP already on my german channel. Only Design patterns are missing in that one, but I cover many of those in seperate videos
It's already full screen, it can't really get any bigger. What are you watching it on? If he cropped out just the code panel, then you wouldn't be able to see the console output etc.
Well done but you fail to get into the motivation and intuition behind using OOP in the first place. This video is great if you already knew the "point" of using OOP and want to do it in Python, but there is little knowledge shared about thinking in terms of OOP, breaking your program down in a way that works with OOP, and in general the reasoning behind the process. Perhaps a topic for a new video? It would be a nice complement to this OOP "inplimentation" video. Anyway, many to to this wonderful German (or Austrian?) teacher!
@@codingcrashcourses8533 Your intro only showed the outline of what was to be discussed in the video. Rather, I was thinking a high-level overview of the concepts and theory behind OOP in general, to give some context before jumping right into doing OOP in Python. Basically something that answers: "what's the point of OOP?" Thanks.
there are many usecases... everytime you need unique values. Lets say you want to store your custom classes in a set and make sure you don´t have duplicated ones. {person1, person2, person3}
@@codingcrashcourses8533 also just wanted to say thank you so much for this course! really helpful and i understood alot of the concepts you covered! I subscribed and liked!
Related videos
Pydantic: th-cam.com/video/7aBRk_JP-qY/w-d-xo.html
Software Engineering with Python: th-cam.com/video/6g6_nM7vCXc/w-d-xo.html
Finally completed watching the video. Good OOP tutorial. The new thing for me was slots. We dont see they are widely implemented and probably that's why not many tutorials cover them. Again, thank you for creating this comprehensive tutorial.
Thank you very much:)
great video. haven't done python in a few years so needed a refresher
@@ooagabonjoaga2680 thank you for your Kind comment:)
THE best OOP Python course, periodddddd.
Thank you so much :-)
I enjoyed this course very much. As a beginner I felt like this was the perfect balance between thoroughness and breadth. Of course, some of the concepts I won't be able to execute on my own nor perfectly follow their logic/sequence with complete understanding, but now I have a strong OOP framework in my head that I can slowly build upon with practice. Great teaching style too- if you release any more videos on topics I'm trying to learn I will definitely watch them. Many thanks
Great! Yes it will take time to figure out when to use what. It´s all not easy, but if you finish a course like this you seem to have the grit to to it ;-)
Great content , you are a wonderful teacher
Thank you so much
Concepts are well explained. Thank you. You've a new subscriber
Thank you :)
Good course as a refresher if you haven't used python's OOP for a while. For beginners it could be a lot.
thanks a lot for the great video! I especially like the Design Patterns part. Just a feedback: I wish you first explained what you want to achieve with each example and then implemented the code and briefly went over why each element is necessary. For example why the super class Observer is needed.
Coming from a C programming background, every problem I encounter during coding, seems like it will be solvable by functions. I never understood the real need of making classes. It would be nice to make another video going a bit deeper in design patterns part, explaining the chain of thought of "why" you choose classes for specific problems. Thanks a lot!
Thank you for your feedback. Maybe I can create a Design Patterns video in the future, where I cover this and also show "functional" alternatives with Python :)
@@codingcrashcourses8533 A more in-depth video on design patterns and best practices will definitely be appreciated! :) With some more concrete examples of when you choose each design pattern or if it's a personal choice etc.
Very interestign video one question so far: 38:00 you talk about how to add archers to company. When you add them by the + operator the company's size argument does not seem to work. Although you specify a comapny just with 5 archers, even if you add 6 the company adjusts and you never get notified that the maximum number of archers has been reached. Even when the iter and next are added if you have more than 5, they will all appear int he print. Any ideas how to correct it?
Thank you! I made a logical mistake:
def __add__(self, other):
if not isinstance(other, Archer):
raise TypeError("Only adding Archers allowed")
if len(self.archers) >= self.size:
raise ValueError("Company already full") # Raise error if full
self.add_archer(other)
return self
I also have to add the check here...
I hope the __hash__ method could be explained clearly with its application. What they are for? Thanks.
Everytime you need unique values or want to compare values, you calculate a hash.
Lets say you want to store your custom classes in a set and make sure you don´t have duplicated ones. {person1, person2, person3}
Will the video still be available on your German channel? I need to brush up on my Python skills. :-)
There is a 2,5 hours video on OOP already on my german channel. Only Design patterns are missing in that one, but I cover many of those in seperate videos
Please zoom your editor please
Do you watch this on your Phone or PC?
I think the zoom was perfect, but I watched from a PC
It's already full screen, it can't really get any bigger. What are you watching it on? If he cropped out just the code panel, then you wouldn't be able to see the console output etc.
@@user-lg4le8xr4sThere’s a way to set the fonts to bigger sizes
Well done but you fail to get into the motivation and intuition behind using OOP in the first place. This video is great if you already knew the "point" of using OOP and want to do it in Python, but there is little knowledge shared about thinking in terms of OOP, breaking your program down in a way that works with OOP, and in general the reasoning behind the process. Perhaps a topic for a new video? It would be a nice complement to this OOP "inplimentation" video. Anyway, many to to this wonderful German (or Austrian?) teacher!
Hm, in the intro I tried to explain the motivation behind it. What did you expect that to look like?
@@codingcrashcourses8533 Your intro only showed the outline of what was to be discussed in the video.
Rather, I was thinking a high-level overview of the concepts and theory behind OOP in general, to give some context before jumping right into doing OOP in Python.
Basically something that answers: "what's the point of OOP?"
Thanks.
@@fluffykitties9020 Ok, so you probably expected something like "4 pillars of OOP". Understood.
im still pondering what would be the usecase of __hash__ /
there are many usecases... everytime you need unique values. Lets say you want to store your custom classes in a set and make sure you don´t have duplicated ones. {person1, person2, person3}
in 24:11 why self.arrows == self.arrows?? for the rest you did self.(variablename) == other.(variablename)
ups, i made an error there. Thanks for pointing it out. other.arrows is correct of course.
@@codingcrashcourses8533 also just wanted to say thank you so much for this course! really helpful and i understood alot of the concepts you covered! I subscribed and liked!
Please upload odoo software tutorial Please
th-cam.com/video/6g6_nM7vCXc/w-d-xo.html
@@codingcrashcourses8533 it is python..I tell ODOO ERP SOFTWARE
Martin Thomas Thomas Donna Miller Scott
Are you German?
Yes. Hard to hide my accent
from abc import ABC, abstractmethod
class AbstractCharacter(ABC):
@abstractmethod
def walk(self):
pass
@abstractmethod
def run(self):
pass
@abstractmethod
def jump(self):
pass
class Mario(AbstractCharacter):
def __init__(self, name, skills) -> None:
super().__init__()
self.__name = name
self.__skills = skills
@property
def name(self):
return self.__name
@name.setter
def name(self, name):
self.__name = name
@property
def skills(self):
return self.__skills
@skills.setter
def skills(self, skills):
self.__skills = skills
def walk(self):
print("Mario is walking")
def run(self):
print("Mario is running")
def jump(self):
print("Mario is jumping")
mario = Mario()
mario.walk()
mario.run()
mario.jump()
Should probably fail because of missing arguments in the constructor?! :)
@@codingcrashcourses8533
Interesting, thanks friend. If you have the right option, please show me so that I can correct the code.