Let's Talk About Lambda Functions!

John Roth johnroth at ameritech.net
Sat Aug 3 23:14:05 CEST 2002


"Steve Holden" <sholden at holdenweb.com> wrote in message
news:8eR29.216536$724.70821 at atlpnn01.usenetserver.com...
> "John Roth" <johnroth at ameritech.net> wrote in message
> news:uke7hvgvchhm30 at news.supernews.com...
> >
> > "Daniel Fackrell" <unlearned at DELETETHIS.learn2think.org> wrote in
> > message news:3d46c6a2$1_1 at hpb10302.boi.hp.com...
> [ how to indent an anonymous function ]
> > Does this make sense?
> >
> So, are you proposing to alter the syntax for expressions?
>
> > >
> > > lambda in its current form does okay in cases like this.  As an
> > expression
> > > it does not require indentation for anything, but it is also not
> > allowed to
> > > execute statements.
> >
> Which is where we came in.
>
> > Well, yes. And lambda generally does quite well for short functions.
> > The idea that inline functions should be short has a great number of
> > adherents.
> >
> Mostly because anything as complicated as this current proposal is
more
> complicated than defining a named function and using it the once.
Frankly
> (IMHO), anything that need this much explanation is unlikely to find
its way
> into Python.

It's actually much simpler than you seem to be seeing.

John Roth






More information about the Python-list mailing list