Syntax-wise [Python-Dev] Property syntax

Samuele Pedroni pedronis@bluewin.ch
Fri, 31 Jan 2003 23:19:24 +0100


----- Original Message -----
From: "Samuele Pedroni" <pedronis@bluewin.ch>
> So syntax-wise I personally would go for:
>
> do iterate(lst): (x):
>   print x
>
> introducing a new-keyword 'do' (or something similar) and that would imply
> inline-suite-like scoping.
>

this clarify scoping, still while what 'return' should do is more or less clear
cut (non-local return), what break or continue should do is ambiguous:

for lst in lists:
 do iterate(lst): (x):
    if not x: break # should break 'do' or 'for'
    print x

vs

for lst in lists:
 do synchronized(lock):
    if not x: break # should probably break 'for'
    print x

so maybe we need a way to differentiate also this, so two different keyword

regards.