python without OO

richard richardjones at
Wed Jan 26 01:58:18 CET 2005

Davor wrote:

> M.E.Farmer wrote:
>> Wrap your head around Python, don't wrap the Python around your head!
>> This is NOT Java, or C++ or C , it IS Python.
> that's interesting hypothesis that behavior will vary due to the use of
> different language - actually most python scripts that I have seen do
> not even use OO which is quite understandable (same with perl, php,..)
> and I'm not even sure why all these languages have incorporated OO at
> all...

Of course, *all* Python programs (whether you call them scripts or
otherwise) are using objects. Strings, numbers, files, lists,
dictionaries ... they're all objects. You *can't* write a Python program
without objects, but you can do so without a single "class" declaration.

The point that M.E.Farmer was trying to make is that you should not judge OO
by Java or C++. Those languages make OO a burden, with on the one hand
excessive requirements to subclass, and on the othe hand ... well, C++ is
just a burden all round really :)


More information about the Python-list mailing list