while true: !!!

John Schmitt jschmitt at vmlabs.com
Sun Dec 17 02:24:49 CET 2000

I'm enjoying this thread quite a bit.  But I am a little surprised that this
hasn't turned into a structured programming debate.  I fully expected people
to bring up the issue that a loop should have exactly one entry point and
exactly one exit point and that those points should be exactly the beginning
or the end of the loop.  That's the kind of stuff I was taught when I was
learning to program.  Has that gone out of fashion in the 6 years I've been
out of school?  Is my memory of these ideas wrong?

I don't feel qualified to be suggesting new syntax to Python, but I don't
think two kinds of loops would be unpythonic in anyway:

while condition:

and the complement of that would be

while condition

I think being able to test at the end of the loop is pretty convenient and
would help out the situations where you have a primer to the loop.

break and continue and goto are all exactly in the same class with exactly
the same prestige/stigma/usefulness, IMNSHO.  

More information about the Python-list mailing list