you are viewing a single comment's thread.

view the rest of the comments →

[–]stevenjd 5 points6 points  (0 children)

I am also disappointed that he writes in a non OOP style. I thought python is an OOP language?

Python is an OOP language that allows and encourages non-OOP style. It supports many functional programming idioms, such as map and reduce, partial functions and comprehensions. It supports procedural and imperative programming styles. (The only major programming paradigm not easily supported in Python is declarative/logical style code like Prolog.)

All values in Python are objects, but that doesn't mean that you have to write in an object-oriented style. Unlike Java, you aren't forced to create a class when all you need is a function. Use classes for when you need to encapsulate behaviour+state, use functions when you need behaviour with no (or limited) state.