why no "do : until"?

Robin Becker robin at jessikat.fsnet.co.uk
Sat Dec 30 19:34:49 EST 2000


In article <05C6FUhLDNUU-pn2-tuTnzOCokxem at bill>, William Sonna
<wsonna at attgloball.net> writes
>On Sun, 30 Dec 3900 03:00:05, henry_crun3583 at my-deja.com wrote:
>
>> Can someone point me at an explanation of the logic for not having
>> do:
>> until
>
>Its a design flaw in Python.
>
>There is no rational reason not to have it. Anyone who has worked with
>Pascal or Rexx (or even regular expressions) knows that "one iteration
>plus zero or more iterations" is NOT as good as "one or more 
>iterations", because the resulting code is sloppier.
>
>So while there are workarounds for this bit of illogic, they are, 
>nonetheless workarounds.
>
in this case I have to agree with the pascalers there's no reason not to
have these extra loop constructs other than style/convention. On the
other hand there are other loop constructs so if we add one why not the
others eg

        T=0
        until T>=25:
                stuff

or 
        loop:
                stuff
                if T>=25: break

of course the the above/repeat seems to be redundant as

        while 1:
                T=....
                if T>=25: break

Python is actually a bit broken as continue inside try blocks is not
allowed.

The malevolence/stupidity of the data set used by Guido will forbid any
such minor modifications of the language as his original tutees
presumably chose just those constructs which, in his benevolence, he now
allows.
-- 
Robin Becker



More information about the Python-list mailing list