why no "do : until"?

Rainer Deyke root at rainerdeyke.com
Wed Jan 10 12:22:07 EST 2001


"Steven D. Majewski" <sdm7g at virginia.edu> wrote in message
news:mailman.979144343.8725.python-list at python.org...
>
> On Wed, 10 Jan 2001 gregory_wilson at my-deja.com wrote:
> >
> > A proposal I floated a year ago, based on feedback from students in
> > the Python course I teach, was:
> >
> >     do:
> >       first-half
> >     while cond:
> >       second half
> >
> > which would allow the following degenerate forms:
> >
> >     do:
> >       body
> >     while cond
> >
> > and
> >
> >     while cond:
> >       body
> >
>
> How do you distinguish between a single loop:
>
> do:
>   stuff
> while cond:
>   more_stuff
>
> and two separate degenerate loops:
>
> do:
>   stuff

This is not a valid loop: all 'do' loops require a 'while'.


--
Rainer Deyke (root at rainerdeyke.com)
Shareware computer games           -           http://rainerdeyke.com
"In ihren Reihen zu stehen heisst unter Feinden zu kaempfen" - Abigor





More information about the Python-list mailing list