What's better about Ruby than Python?

Borcis borcis at users.ch
Mon Aug 18 20:38:41 CEST 2003


John Roth wrote:
> 
> This is why Ruby's solution is superior: "self" is a reserved word,
> and so is the special character shortcut. There is no question as
> to what is meant. It eliminates essentially futile arguements in the
> same way that Python's indentation eliminates arguements about
> the proper placement of braces.
> 

This sets a specific target to an obfuscated python context :

Illustrate the freedom that python gives you to replace the name
of "self" in methods by any identifier you want, with a piece of
code designed to put the collision between class variables and the
name actually used in the method source as a replacement to "self",
into a functional role as a part of the main loop.

Or something comparable  :)







More information about the Python-list mailing list