REPEAT... UNTIL ?

Ville Vainio vvainio at tp.spt.fi
Thu Jul 4 10:04:43 EDT 2002


beej at piratehaven.org (Beej J?gensen) wrote in message news:<afvv5j022q2 at enews1.newsguy.com>...

> (The other side of the coin is that my only argument for more looping
> primitives is that while-1 loops are ugly-looking, and don't make for
> the most readable code.  Some people disagree or feel it's less
> important.  And personally I always feel like I'm undergoing some kind
> of algorithmic failure when I code one; like I must not be doing the
> Right Thing.  But in Python, it is.)

Strangely enough, while 1 - loop is quite often the most intuitive way
to do things, yet it's (implicitly) frowned upon in many programming
language cultures. The same applies to calling 'continue' instead of
elif. Flat is good. This seems to be mostly a documentation issue. It
would probably feel slightly less awkward if the keyword 'loop' was an
alias for 'while 1', but that will never happen.

-- Ville



More information about the Python-list mailing list