PEP 315: Enhanced While Loop
Erik Max Francis
max at alcyone.com
Tue May 6 15:43:49 EDT 2003
Steven Taschuk wrote:
> 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.
Agreed. There is precedent for such an "until" construct (i.e., one
that simply a while with a negated conditional) in other languages, such
as Perl. So not only would such a construct be nonobvious, there is
directly conflict with what it would mean in other languages. Giving
false indicators of intuitiveness is a really, really bad idea.
(And no, I don't think a Perl-like "until" should be added, either.)
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ To be adult is to be alone.
\__/ Jean Rostand
CatCam / http://www.catcam.com/
What do your pets do all day while you're at work? Find out.
More information about the Python-list
mailing list