[Python-ideas] Updating PEP 315: do-while loops
spir
denis.spir at free.fr
Sun Apr 26 14:30:26 CEST 2009
Le Sun, 26 Apr 2009 16:42:36 +1000,
Steven D'Aprano <steve at pearwood.info> s'exprima ainsi:
> The only variant that I find natural is the Pascal-like:
>
> do:
> suite
> until condition
>
> where the "until" is outdented to be level with the do. My vote goes for
> this, although I'm probably biased by my familiarity with Pascal. How
> does that feel to you?
Same for me.
> I don't think I could live with
>
> do:
> suite
> while condition
I could survive it because it is linked to the "do:" header. But the real drawback for me is that it should rather express the exit-condition, because it is placed at the end.
Anyway, I would support the "while" version if "until" gets to much opposition (for introducing 2 new keywords instead of only 'do').
Both are much better imo than the header versions.
Denis
------
la vita e estrany
More information about the Python-ideas
mailing list