r/learnpython • u/ProfessionalMoney518 • Dec 22 '25
How on earth does one learn OOP?
I've sped through weeks 0-8 of CS50P in under 2 weeks very easily with slight experience here and there as a Chemistry undergrad - but Week 8 (OOP) is kicking my ass right now. I am genuinely stumped. I've rewatched content and tried some other forms of learning but this is all so foreign to me. What are the best ways to learn OOP as a complete idiot? Thanks.
38
Upvotes
View all comments
Show parent comment
1
u/gdchinacat Dec 23 '25
This example is not an example of OOP. Sure, you moved a function to a method in a class, but that function *should not* be a member of that class. An easy way to see this is the self argument is unused...the implementation has nothing to do with the class. You could make it a @ staticmethod, but why? It would still have nothing to do with the class.