do...until wisdom needed...

Ken Peek Peek at LVCM.comNOSPAM
Mon Apr 16 02:50:23 EDT 2001


Hmmm...  nice syntax, but still ambiguous ("a" may ALREADY be equal to "b"
before the loop starts, and it is not obvious that the loop executes once
anyway.)  I too share your dislike for the control structures at the end of code
blocks-- but, what to do?  (Pun intended!)


"deadmeat" <root@[127.0.0.1]> wrote in message
news:HZvC6.2488$p5.8503 at news1.rivrw1.nsw.optushome.com.au...
> > Here is my question--  If Python WERE to have a "do...until" construct,
> what
> > would be the best way to implement the syntactical rules?
>
> until a == b:
>     some
>     thing
>
> ie. the same as while, except until guarantees at least a single recursion.
> this would mean very little change to Python to implement, just a minor
> modification on the while handler.
>
> it's not as clear as do (code) until but I don't like ending code blocks
> with with control structures... esp. not in Python.
>
>
>
>





More information about the Python-list mailing list