while true: !!!
aleaxit at yahoo.com
Mon Dec 11 18:13:07 CET 2000
"Steve Williams" <sandj.williams at gte.net> wrote in message
news:3A350405.B8F09EC7 at gte.net...
> I wouldn't call "While true" a python-idiom, I'd call it a
With some effort, I guess one MIGHT find assertions with
which I'd disagree more drastically than this one -- but,
it WOULD take effort.
How *WOULD* you prefer to express Knuth's classical
"N-times-and-a-half" loop (in Python, C, C++, Java, &c)
if not by (pseudocode):
'loop until otherwise terminated':
'first-part' suite of statements
if 'termination-condition': break
'second-part' suite of statements
The 'loop until otherwise terminated' clause is _best_
in Python, while other languages offer you a choice
as well as
(with a while(1) at the end), etc.
What do you claim is "barbarous", "grammatically faulty",
etc, about using "while 1:" to express "loop until
otherwise terminated" in Python?
More information about the Python-list