PEP 315: Enhanced While Loop

Ben Allfree benles at bldigital.com
Sat May 3 16:08:34 EDT 2003


But both of you are getting caught up in the name I chose rather than the
concept of introducing a single new loop construct that somehow clearly
indicates that the exit test will be performed after the loop body has
executed once.

> -----Original Message-----
> From: python-list-admin at python.org [mailto:python-list-admin at python.org]
> On Behalf Of Steven Taschuk
> Sent: Saturday, May 03, 2003 10:14 AM
> To: 'Python List'
> Subject: Re: PEP 315: Enhanced While Loop
> 
> Quoth Ben Allfree:
>   [...]
> > # New way
> > until not Poor():
> >    MakeMoney()
>   [...]
> > Python programmers would just have to understand that the "until"
> construct
> > executes once before evaluation. Or maybe it could be named something
> more
> > obvious. "AfterWhile" - heh - no pun intended.
> 
> I have to agree with Alex here: Ick.  My expectation on seeing
>     until foo():
>         bar()
> is that it would be equivalent to
>     while not foo():
>         bar()
> The proposed out-of-order execution is a recipe for confusion,
> imho.
> 
> --
> Steven Taschuk                  staschuk at telusplanet.net
> "Telekinesis would be worth patenting."  -- James Gleick
> 
> --
> http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list