On Wed, 14 Oct 2009 18:30:06 +0100, Tim Rowe wrote: > 2009/10/14 Dennis Lee Bieber <wlfr...@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!
That's a stupid objection. Python doesn't guarantee that any of the following will halt: for x in iterator: pass while flag: pass for x in [1, 10, 20, 10**100]: time.sleep(x) (Technically, that last one will eventually halt, if you're prepared to wait long enough... about a billion trillion trillion trillion trillion trillion trillion trillion years.) Why should Python make that guarantee about this hypothetical "loop forever" construct? -- Steven -- http://mail.python.org/mailman/listinfo/python-list