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

Jaap Vermeulen (jaap@sequent.com)
Fri, 10 Dec 93 12:48:00 PST

| 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 ?

As I understand it, the parser does not handle multiple compound statements
on a single line (i.e. any statement including a trailing ':'). Probably it
is a major rewrite to change that. It never bothered me.

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

Possible rewrite:

for x in testof(list):
do_something

$0.02

-Jaap-