r/PythonLearning • u/Objective-Remove-632 • Oct 09 '26
Do I really need to learn class.
Both function and class give the same output. So why do I need it?
70
Upvotes
r/PythonLearning • u/Objective-Remove-632 • Oct 09 '26
Both function and class give the same output. So why do I need it?
View all comments
Show parent comment
1
u/silvertank00 Oct 09 '26
define huge. Its more like a complexity issue: if your program interacts with a bunch of stuff (ipc, serial, ws/http, logging) alongside your business logic then good luck keeping it clean without OO.
Classes are not always needed, but when they are, they cannot be left out without making a mess.