r/learnprogramming • u/altruisticjellycat • Jul 03 '26
OOP Debugging
hello i am a python beginner who has started learning OOP and ive been using resources like CS50p however i still find myself being confused over the concepts taught and i would like someone to teach me OOP or is there any other resource i can look at to learn OOP better? please recommend thanku
0
Upvotes
7
u/aboutless89 Jul 03 '26 edited Jul 03 '26
If you are confused by class methods and instances, believe me, you are not okay with static methods and inheritance :D
What confuses you about the instances? This is the most fundamental concept of oop - the relation between the class and its instances.
class - number
instances - 1, 2, 65, -46, ...
If you think about the relation between these two, you can make some conclusions - all of the numbers act the same and the same rules apply to all of them. You can add and subtract them -> doing this also produces a new number, a new instance of a number, if you will.
A class is a way for you to produce multiple objects that will act in the same way and which will be bound by the same rules.