do .. while loops ?
phil hunt
philh at comuno.freeserve.co.uk
Sun Jul 15 12:07:18 EDT 2001
On Sun, 15 Jul 2001 14:00:31 +1000, Paul Andreassen <paul at andreassen.com.au> wrote:
>
>Could someone please tell me why "do .. while" loops are not part of the
>python language?
Because they complicate the language, probably. Also, doing else:
continuations with them would look a bit ugly, IMO:
do:
...code...
if x: break
...more code...
while a>b
else:
...stuff if we didn't break...
Personally, if i was designing a Pytohn-like lang, it'd have
"loop" which does the same as "while" but "loop:" would
mean "while 1:"
loop:
fun1()
if x: break
fun2()
etc.
--
#===== Philip Hunt == philh at comuno.freeserve.co.uk ======#
Herbivore: effort-free public key encryption. See:
<http://www.vision25.demon.co.uk/oss/herbivore/intro.html>
** First software release coming soon! **
More information about the Python-list
mailing list