I've heard that "if a class is just a constructor and one method, then it should be a function". What is your opinion on this and what are counter examples?
I watched a seminar a few years ago about someone talking about the misuses of OOP in python and talked extensively about the case where people write a class, implement the `__init__()` method and one extra method and that's it.

He provided examples and showed functional code that simplifies the solution to a few lines and he said:

&gt; "If a class is just a constructor and one method, then it shouldn't be a class at all. It should be a function."

I can't find the video anymore, but I was just wondering what reddit thinks about this statement and if you have any counter examples or in what cases it could be useful.

I'm also interested in the cases where if it is true, how would that functional implementation look like when I need some sort of a state to persist.


EDIT: Awesome discussion in the comments. Thanks for everyone's input!