Re: multi-statement lines ( why can't I ... )

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Fri, 10 Dec 1993 19:07:03 -0500

On Dec 11, 0:23, Guido.van.Rossum@cwi.nl wrote:
>
> I don't know if I like this particularly, but if you do, in release
> 1.0 you will be able to write
>
> for x in filter(testof, list): do_something
>

Or more likely in actual use:

for x in filter( LAMBDA-EXP, list ): do_something

where LAMBDA-EXP is whatever the syntax in 1.0 is going to be for
some simple test, like 'x[:3] == key' .

I like the OTHER syntax better, but I see the problem with it.
But perhaps lambda will introduce similar problems. (?) Can you
have a multi-line lambda ? If not, how does IT parse if/else ?
Which brings us back to the question of the need for a Literal
token for INDENT/DEDENT.

- Steve M.