r/learnpython • u/rwmmir • Oct 07 '20
Classes in Python
Hey,
what is the best way to learn using classes in Python? Until now, I was using functions for almost every problem I had to solve, but I suppose it's more convenient to use classes when problems are more complex.
Thanks in advance!
324
Upvotes
2
u/[deleted] Oct 08 '20
I dont want to split hairs but technically the init function is not a constructor. The object is already constructed when init gets called. It's similar to a constructor but it would be more accurate to call it an initializer.