<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>On Jun 27, 2013, at 9:53, <a href="mailto:jimjhb@aol.com">jimjhb@aol.com</a> wrote:</div><div><br></div><blockquote type="cite"><div><font color="black" size="2" face="arial">

<div style="font-size: 10pt; color: black;"><font face="arial, helvetica">-----Original Message-----</font><br>
<font face="arial, helvetica">From: Ethan Furman <<a href="mailto:ethan@stoneleaf.us">ethan@stoneleaf.us</a>></font><br>
<font face="arial, helvetica">To: python-ideas <<a href="mailto:python-ideas@python.org">python-ideas@python.org</a>></font><br>
<font face="arial, helvetica">Sent: Thu, Jun 27, 2013 12:43 pm</font><br>
<font face="arial, helvetica">Subject: Re: [Python-ideas] PEP 315: do-while</font><br>
<br>




<div id="AOLMsgPart_0_73ce9987-2cd1-4fa5-bdf9-be3e05588734" style="margin: 0px; font-size: 12px; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">

<pre style="font-family: Tahoma, Verdana, Arial, sans-serif; font-size: 9pt;"><tt>On 06/27/2013 07:48 AM, <a removedlink__1828471242__href="mailto:jimjhb@aol.com">jimjhb@aol.com</a> wrote:
>
> Bottom line is most other languages allow early termination of for loops
> without breaking out of them.  Python does not.

If they are terminating early, then they most certainly are breaking out of 
them, regardless of whether the word 'break' 
is used.</tt></pre><pre style="font-size: 9pt;"><tt><font face="Arial, Helvetica, sans-serif">Yes, but the control flow (and location of the control) is different.  All this "don't use breaks" stuff can be traced back  to E.W Dijkstra and structured programming.  Structured programming remains in a lot of mindsets today.</font></tt></pre></div></div></font></div></blockquote><div>Structured programming is all about how to write maintainable programs in a low-level Algol-like language, and that's what C is. But that's not even close to what Python is. People trying to program Python as if it were C are going to write bad Python. Bending over backward to accommodate them will only make things worse.</div><div><br></div><div>The best thing we can do is use as many generators as possible--anyone who thinks break doesn't belong in Python will suffer from head-asplode once they finally realize what yield does to control flow, and then they'll no longer be a problem.</div><div><br></div></body></html>