while true: !!!
R.Brodie at rl.ac.uk
Mon Dec 11 20:02:30 CET 2000
"Alex Martelli" <aleaxit at yahoo.com> wrote in message news:9131vd0pnq at news2.newsguy.com...
> What do you claim is "barbarous", "grammatically faulty",
> etc, about using "while 1:" to express "loop until
> otherwise terminated" in Python?
Speaking for myself (of course), I find it somewhat unaesthetic
to have a loop construct that doesn't document what its terminating
The congruence argument is an interesting one but I'm not sure
entirely to the point. I could say that I prefer:
rather than a construct like
The former let's you abstract part of the problem.
It's a valid point on the usability of the language. I'm not sure there
is a good answer to the original one though. If there were a better
pseudocode notation someone would be using it by now. Maybe just
while 1: # Loop condition
I suppose for the specific case we came in on, having an xreadlines
function (by analogy with xrange) has been discussed and rejected
More information about the Python-list