a Python person's experience with Ruby

Kay Schluehr kay.schluehr at gmx.net
Sun Dec 9 02:25:43 EST 2007


On Dec 8, 8:56 pm, Steve Howell <showel... at yahoo.com> wrote:
> --- Bruno Desthuilliers
>
> <bdesth.quelquech... at free.quelquepart.fr> wrote:
> > Colin J. Williams a écrit :
> > > I'm not sure that I like add 3, 5, 7
>
> > > but it would be nice to be able to drop the
> > parentheses
> > > when no argument is required.
>
> > > Thus:         close;
> > > could replace close();
>
> > This just could not work given Python's object
> > model. The parens
> > actually *are* the call operator.
>
> I mostly agree with you, but in the specific use case
> of having just a single token on a line, you could
> argue that Python could DWIM on calling an object if
> the object is callable, since otherwise it's just a
> no-op.

Argh! I smell context sensitive semantics which is the road to
language design hell. Fortunately this hell is already occupied by
Perl and Larry Wall is a charming and funky guy. You know what look
for.




More information about the Python-list mailing list