Python's Lisp heritage

Ben Wolfson wolfson at
Sun Apr 28 00:15:44 CEST 2002

On Sat, 27 Apr 2002 15:10:33 -0500, Alex Martelli wrote:

> acek Generowicz wrote:
>         ...
>> The purpose of the parentheses (in this context) is to call functions
>> and associate parameters with those function calls. Python has a not
>> too dissimilar use of parentheses:
> Anyone for Haskell's f a b c ...?  Now THAT is clean and elegant... the
> concept of "a function with > 1 parameter" is unnecessary (as Haskell
> Curry pointed out), so there's no need to associate a function with any
> more than its first (and only) parameter: f a returns an unnamed
> function which takes argument b, returning another unnamed function
> which takes argument c.  Look, ma, no parentheses -- and no tricks
> needed to achieve that, just some deep mathematical reality:-).

No parentheses in the simple case, maybe, but at least in SML, which is
similar, the parentheses can multiply pretty quickly if one of the
parameters is the result of a function, or a function returns a function:
(f a (g b)) (h c) isn't all that pretty, unless you like Lisp.  Haskell
may be smarter about that kind of thing, though.

 -- Crgre Jvyyneq

More information about the Python-list mailing list