/r/Python
 /r/madeinpython
 /r/programmingbuddies
 /r/pythontips
 /r/flask
 /r/django
 /r/pygame
 /r/programming
 /r/learnprogramming
 /r/dai

Does/did anyone else have a hard time understanding classes and how to use them? : learnpython

submited by
Style Pass
2021-06-13 16:30:20

/r/Python /r/madeinpython /r/programmingbuddies /r/pythontips /r/flask /r/django /r/pygame /r/programming /r/learnprogramming /r/dailyprogrammer

Ensure your example is correct. Either the example compiles cleanly, or causes the exact error message about which you want help.

I am having such a difficult time understanding and trying to implement classes. I have been watching tutorial after tutorial trying to understand how to use the functionality of classes but these guys talk way too fast and move to quickly. I just can't get a clear understanding on a lot of it. Like I understand classes are meant to prevent spaghetti code by assigning attributes to objects you're creating, but I don't understand the methods under the __init__ method in the class. What are all of these methods? And why aren't they being defined outside of the class? Ugh I'm so confused, something isn't clicking for some reason.

I see a lot of people struggle when they first encounter classes so I'm going to try and really give a lot of detail and hopefully clear some things up.

Leave a Comment