<p>Hi,</p>
<p>(sent from my phone)<br>
On Jun 8, 2012 11:35 PM, "Yuval Greenfield" <<a href="mailto:ubershmekel@gmail.com">ubershmekel@gmail.com</a>> wrote:<br>
><br>
> On Fri, Jun 8, 2012 at 12:04 PM, Nick Coghlan <<a href="mailto:ncoghlan@gmail.com">ncoghlan@gmail.com</a>> wrote:<br>
>><br>
>> (context for python-ideas: my recently checked in changes to the<br>
>> tutorial, that added the final paragraph to<br>
>> <a href="http://docs.python.org/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops">http://docs.python.org/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops</a>)<br>

>><br>
><br>
> If we're on that subject then I think this<br>
><br>
> > Loop statements may have an else clause; it is executed when the loop terminates through exhaustion of the list (with for) or when the condition becomes false (with while), but not when the loop is terminated by a break statement.<br>

><br>
> Doesn't hit the "break" nail on the head fast and hard enough in my opinion. I'd replace it with something like:<br>
><br>
> > Loop statements may have an else clause; it is executed immediately after the loop but is skipped if the loop was terminated by a break statement.<br>
></p>
<p>Yes. This is why I've been suggesting for a while that we call these constructs for/break/else and while/break/else.</p>
<p>As Terry says, this is not the whole truth but you'd have to have a warped mind not to extrapolate the correct behaviour when there is a return or raise in the loop body.</p>
<p>Arnaud</p>