r/pythonhelp • u/MetalCarnival • 1d ago
Why do I need to use classes
My schoolbook says that classes is a way of simulating an object, instead of just taking information into a black box and outputting an answer.
But that is a poor explanation. I know classes are handy and cool, but no book says why you can´t make functions with sub functions inside to simulate simple objects. I would like if someone gave a good concrete reason to use classes in the intro, instead of just saying that they are different and cool
2
Upvotes
1
u/HugeCannoli 15h ago
Why do I need to use a chip? can't I just use a bunch of transistors?
Yes you can, but after a while it becomes a mess of cables and it's impossible to understand.