When to use classes (OOP)?
📁 oop, method, Encapsulation: Private Attributes and Properties, Advanced Python Topics, Useful Tips and Lifehacks, AI, lesson
I've been studying/programming in Python for a year, but I still can't understand when to use classes. Reading books and watching video lessons, I understand things like encapsulation or what abstraction is. But when it comes to the moments when exactly to use OOP, I get stuck.
In my thinking, classes can be replaced with modules containing a set of thematic functions. No self's before variables and as the first argument of methods, no class declarations before use, just import and use.
What tips/study materials can you give for understanding this topic and studying OOP as a whole?
p.s. I saw a question, but it didn't answer mine.
No answers yet.
Log in to leave an answer
Blogs
How to Get Hired as a TypeScript Developer: Tips and Resume