<div dir="ltr">I first discovered this language feature when teaching Python to non-programming in my CS0 course. They'd use else on while loops, and it would work. I've had to work to break them of the habit (since none of the programs they're writing need that sort of 'finally' functionality on loops).<div><br></div><div>Jay</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Mar 20, 2015 at 1:09 PM, Joe Shaw <span dir="ltr"><<a href="mailto:joe@joeshaw.org" target="_blank">joe@joeshaw.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div>For reference, from the Python docs: <a href="https://docs.python.org/2/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops" target="_blank">https://docs.python.org/2/tutorial/controlflow.html#break-and-continue-statements-and-else-clauses-on-loops</a><br><div><br></div><div>Joe</div></div><br><div class="gmail_quote"><span class="">On Fri, Mar 20, 2015 at 12:33 PM timothy spencer <<a href="mailto:smashing_good_show@hotmail.com" target="_blank">smashing_good_show@hotmail.com</a>> wrote:<br></span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
<div><div dir="ltr">So you can use an "else" statement with a for loop or a while loop. I didn't know that. I came across that in Lutz's book. There was no mention of that in Zed's book. I just thought that was pretty neat. </div></div></span>
______________________________<u></u>_________________<br>
CentralOH mailing list<br>
<a href="mailto:CentralOH@python.org" target="_blank">CentralOH@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/centraloh" target="_blank">https://mail.python.org/<u></u>mailman/listinfo/centraloh</a><br>
</blockquote></div>
<br>_______________________________________________<br>
CentralOH mailing list<br>
<a href="mailto:CentralOH@python.org">CentralOH@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/centraloh" target="_blank">https://mail.python.org/mailman/listinfo/centraloh</a><br>
<br></blockquote></div><br></div>