2 ms·
When Python was being conceived OOP was all the rage, with "everything is an object in Python" motto. Even if you want, you can't have bare structs, you need to
by dvfjsdhgfv 6y ago
When Python was being conceived OOP was all the rage, with "everything is an object in Python" motto. Even if you want, you can't have bare structs, you need to create a class. At this point refusing to add a method to it and using external functions to modify its state is just a matter of taste - in many cases it makes sense, and in several it doesn't.