HACKER Q&A
📣 baconbkr

Barely ever used OOP in Python, am I doing something wrong?


As per the title. I've just had an interview with a startup, and the exercise was a very simple one that required the creation of a class to solve. I found myself struggling to do so, far more than I would have imagined.


  👤 baconbkr Accepted Answer ✓

👤 GianFabien
Python allows you to use imperative, functional and object-oriented programming paradigms. Even a mixture of all three.

Depending on the problem being solved your abstractions might better fit one of those three than the other two. I consider it to be a feature for Python.