The rap against "while True:" loops

Tim Rowe digitig at gmail.com
Wed Oct 14 13:30:06 EDT 2009


2009/10/14 Dennis Lee Bieber <wlfraed at ix.netcom.com>:

>        If anything -- I'd suggest a proposal to add a plain    loop    as a
> keyword in Python, whose effect is equivalent to a "while True", but a
> break    must be used to exit said loop (well, we'll ignore raising an
> exception <G>)

And with enough static analysis to guarantee that the break will be
reached? I think it would be a bit much to expect Python to solve the
halting problem!

-- 
Tim Rowe



More information about the Python-list mailing list