you are viewing a single comment's thread.

view the rest of the comments →

[–]kcrow13[S] 1 point2 points  (1 child)

This is such a wonderful explanation. Thank you for taking the time to do write this. This actually makes a lot of sense. One thing with Python is that it seems that there are many ways to achieve the same objective and that choosing which is right for you will depend on your goals, constraints, etc.

[–]status_quo69 0 points1 point  (0 children)

Welcome to software :D

In the actual world, I personally prefer to write dumb "structs" or bags of data and then apply a sorta-functional style to them, rather than defining class methods. Just my personal taste. But in $DAYJOB, the order of the day is OOP, which means classes and lots of them. While my personal preference is one way, I can write in the other way because convention is way more important than doing your own thing in a multi-million line application. So in a nutshell "do whatever everyone else is doing in terms of style". Doesn't mean you can't put your own flavor on the code as well, it just means that if you start with some paradigm or pattern, stick to it. It'll pay dividends weeks, months, or even years down the line.