Concrete Proposal: while ... and while ...

Evan Simpson evan at tokenexchange.com
Thu May 20 09:25:58 EDT 1999


In my original proposal, yes, each "and while" was equivalent to an
outdented "if not test: break".  I thought of an extended "while" as reading
like "while this and while that and while the other", so that the failure of
any test ends the loop (and enters the "else" suite).  Break and continue
can still be used to construct other behaviors.

Of course, having gone to the trouble of actually implementing it, you get
to decide how it works :-)

now-we-just-need-"and if"-ly y'rs
Evan Simpson

Corran Webster wrote in message <7i037u$n4n$1 at news.tamu.edu>...
> I'd resist it because I'm not sure what a multi-conditional version should
> _do_?  Should multiple "and while"s act like "if not test: break", or
> should it be more like:
[snip]







More information about the Python-list mailing list