Settings

Theme

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

2 points by baconbkr · 2 comments · 1 min read


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.

2 threads
baconbkrOP

Found this a second after I posted: https://stackoverflow.com/questions/33072570/when-should-i-b...

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.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection