I’ve been getting up to speed on object-oriented programming. I understand how to do it, but I don’t understand why and when it makes the most sense. My head currently thinks mostly in procedural programming largely because all of my past programs are simple and very singularly focused. If I were to write my programs as oop, they still would only have one instance of one object so I think there would be less benefit from the rewrite as if I had a bigger program with many instances of different objects.
I’ve been boning up on OOP videos recently and found this series from Corey Schafer on youtube. It’s well explained, and broken out into good logical pieces.
Python OOP Tutorial 1: Classes and Instances – YouTube
Python OOP Tutorial 2: Class Variables – YouTube
Python OOP Tutorial 3: classmethods and staticmethods – YouTube
Python OOP Tutorial 4: Inheritance – Creating Subclasses – YouTube
Python OOP Tutorial 5: Special (Magic/Dunder) Methods – YouTube
Python OOP Tutorial 6: Property Decorators – Getters, Setters, and Deleters