lambdak: multi-line lambda implementation in native Python

Roy Smith roy at panix.com
Sat Jan 17 18:24:00 CET 2015


In article <mailman.17811.1421497179.18130.python-list at python.org>,
 Skip Montanaro <skip.montanaro at gmail.com> wrote:

> On Sat, Jan 17, 2015 at 5:59 AM, Jussi Piitulainen
> <jpiitula at ling.helsinki.fi> wrote:
> > How far do you want to go? Is "a  b + c" the same as "a(b) + c" or the
> > same as "a(b + c)"?
> 
> I think there is only one practical interpretation, the one that all
> shells I'm familiar with have adopted:
> 
>     a(b, +, c)
> 
> > And I don't really want to know which it is. I prefer parentheses.
> > They are not nearly as fragile.
> 
> Agreed. Without parens, splitting the command line arguments on white
> space is the only non-fragile way to do things.
> 
> Skip

I once worked with a language (with vaguely C-like syntax) in which:

if(x == 4)

and

y = f (x)

were both syntax errors.  If statements *required* a space before the 
paren, and function calls *forbid* it.



More information about the Python-list mailing list