3 ms·
How about we all just admit that "OO" has multiple meanings? There is OO as a style of software design: we give data the responsibility for providing an interf
by ggchappell 15y ago
How about we all just admit that "OO" has multiple meanings?
There is OO as a style of software design: we give data the responsibility for providing an interface, which is encapsulated with the data. And the same interface can be used for multiple types of data, thus freeing code from needing to know what type of data it is dealing with.
Python can be used in this style, but it doesn't have to be. I've done plenty of Python programming without using it. And, although no one calls C an OO language, you can program this way in C, if you want. It's painful, but not impossible.
OTOH, there is "OO" as language features, usually mechanisms for encapsulation & instantiation, with some kind of dynamic binding capability, such as Python's classes/objects.
In that sense, I agree with you: Python is an OO language. On the other hand, in the first sense, I agree with the article author: Python supports OO programming, and it also supports programming in other paradigms.