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

Steven D. Majewski (sdm7g@elvis.med.virginia.edu)
Fri, 10 Dec 1993 15:24:06 -0500

Why can't I use a multi-statement line like:

>>>for x in list: if x[:len(key)] == key : print x

without getting an invalid syntax message ?

I could live without the whole statement on one line,
but I would LIKE to have the selector statements be
one line, as in:

>>>for x in list: if testof(x) :
... do_somthing

as it makes it clear at the top that I'm only processing
a subset of list ( and it keeps me from requesting NEW
keywords like "from x in list *with* ... " or something
equally bizarre! :-)

- Steve M.