[Tutor] global variables

Steven D'Aprano steve at pearwood.info
Thu Aug 22 18:18:52 CEST 2013


On 23/08/13 00:59, Andy McKenzie wrote:
> Isn't object orientation kind of the whole POINT of Python?  From python.org:
> "Python is an interpreted, object-oriented, high-level programming language
> with dynamic semantics."


Well, yes and no.

Python is an object-oriented language in the sense that all of Python is built using objects. Everything, including modules, functions, ints, strings, yes, even classes themselves, are objects.

But also no, in the sense that the code you write doesn't have to be written using OOP techniques. Python is a multi-paradigm language in the sense that you can write code using any of these styles:

- object-oriented

- functional

- procedural

- imperative

- or a mix of all of the above.


-- 
Steven


More information about the Tutor mailing list