Re: Lambda binding solved by lateral thinking?

Guido.van.Rossum@cwi.nl
Thu, 03 Mar 1994 10:34:45 +0100

> I believe that's right -- & not what I was trying for either. But I
> think it's _better_ than what I was trying for, because it adds a lot of
> power with a little extra syntax, and I suspect the implementation is
> both finite & clear (to Guido <grin>).

Well I haven't thought about the implementation yet, I was just
looking for a way to have you people shut up :-)

> I believe he's suggesting (Guido, scream where I'm wrong) _just_ a
> default-argument mechanism (more-or-less exactly like C++'s), not a
> (more elaborate) keyword-argument mechanism.
>
> So
> f(1,incr=1)
> would be a syntax error (assignment statement used where expression
> expected). But
> f(1,1)
> would indeed print 2.

That's indeed what I was proposing. Of course keyword parameters
could be added in a later phase as well (since as you point out they
are a syntax error now).

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>