UserLinux chooses Python as "interpretive language" of choice

Francis Avila francisgavila at yahoo.com
Mon Dec 22 22:29:07 EST 2003


Fernando Perez wrote in message ...

Anyway, in my code I have tons of cases where I critically need to
distinguish
between using a 'naked' function and calling it, and I find it always a
pleasure that in python, simply using () or not allows me to, unambiguously,
handle both cases.  Perhaps there is an alternative which I haven't seen or
understood, but I'm genuinely interested in how you'd approach this issue if
the () were optional.  I'm also curious about how it is handled in the Ruby
world, which as I said I'm not familiar with.
###

I knew nothing about Ruby until a few minutes ago.  It seems that the
paradigm is different: Ruby uses messages to methods (which attached to
objects), and methods themselves are not first-class, so there's no
ambiguity.
http://onestepback.org/index.cgi/Tech/Ruby/PythonAndRuby.rdoc

I can't understand the syntax in the example code that shows how you'd get a
Method object.

Of course, the typical Ruby accusation against Python is that it (Ruby) is
"purer OO".  I don't know what they mean by "purer".  If they mean the
fundamental types not being subclassable, that's an old wart that's very
nearly gone.  Otherwise, I don't know what they could possibly mean,
considering absolutely everything in Python is an objects upon objects upon
objects.  A class is an object, the methods of an instantiated class are
objects, the function a method wraps is an objects, the code of the function
is an object....  I think about the only thing that is not an object in
Python is a name, and I can't think how *that* would work.

If by "purer", all they mean is "more like SmallTalk", well, that's just
empty value judgment. ;)

--
Francis Avila





More information about the Python-list mailing list