Let's Talk About Lambda Functions!

Huaiyu Zhu huaiyu at gauss.almadan.ibm.com
Wed Jul 31 22:02:13 EDT 2002


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.  The question is whether that change can be
as simply as nesting indentation inside brackets and dropping the
commas.  That's similar to puting statements vertically or horizontally
with semicolons.  At least we now know that for simple examples the
syntax readability is not a big problem.  It is possible that more
nesting of these two styles and continuation lines might pose bigger
problems.

Huaiyu



More information about the Python-list mailing list