I think it's precedent because it's just a line after a block instead of before it. It certainly is a break from Python's "big outline" look.
> What if the while statement was part of the loop and could be placed arbitrarily?
If you're open to that, I had thought this was a bridge too far, but:
do:
body1()
break if some_condition
body2()
continue if some_other_condition
Under that scheme, the semantics translate to: while True:
do_body
break
And, of course, the `break if` and `continue if` syntax would be general.
My main gripe is the indentation. Your code reads as if the while condition is tested after the loop finishes. What if the while statement was part of the loop and could be placed arbitrarily?
IOW `do:` translates to `while True:` and `while x` to `if not x: break`.Addendum: I would also entertain forcing the `while` to be at the end of the loop -- as I'm not sure what this would do