Let's Talk About Lambda Functions!

John Roth johnroth at ameritech.net
Thu Aug 1 07:52:59 EDT 2002


"Huaiyu Zhu" <huaiyu at gauss.almadan.ibm.com> wrote in message
news:slrnakh5l4.7o1.huaiyu at gauss.almadan.ibm.com...
> John Roth <johnroth at ameritech.net> wrote:
> >
> >"Huaiyu Zhu" <huaiyu at gauss.almadan.ibm.com> wrote in message
> >news:slrnakgake.6hf.huaiyu at gauss.almadan.ibm.com...
> >> John Roth <johnroth at ameritech.net> wrote:
> >> >
> >> >> For vertical scoping, it is not necessary to separate items with
> >> >commas.
> >> >
> >> >Is this valid Python in general, or is this another change to the
> >> >syntax?
> >>
> >> It's just what I think is necessary.  I'm not sure if it fits the
> >> current python parser, although it appears to be so for existing
> >> structures like def, class, if, while.
> >
> >It certainly looks nice, but I think it's a change to the
> >syntax for list and dictionary constructors, which
> >is a different issue.
>
> Since Python currently ignores indentation inside (), [], {}, a syntax
> change is necessary anyway.

That's not exactly true. Python ignores indentation within a single
statement. It assumes that anything between nesting braces is part
of a single statement. Otherwise, you need to use the backslash
convention for continuation.

That's the reason I don't think a second syntax change is necessary:
I've alreay specified the necessary change within arbitrary expressions,
which takes care of the various outfix operators in passing.

> Huaiyu

John Roth





More information about the Python-list mailing list