[Python-ideas] Is this PEP-able? for X in ListY while conditionZ:

jimjhb at aol.com jimjhb at aol.com
Mon Jul 1 15:44:46 CEST 2013


Nick wrote:



>PEP 315 has now been
>explicitly rejected: the official syntax for terminating a loop early
>is the existing break statement, thus any proposal for terminating a
(Nick means terminating a 'for' loop; there is a place to shove a conditional in the 'while' loop syntax.)
I think the (informational) PEP should reflect that this is contrary to early notions of structured programming
(MISRA-1998) but is in accord with updated notions (MISRA-2004, MISRA-2012).  I understand and appreciate
that many python programmers think this may be silly, but structured programming had a big impact on the computer 
science committee and some acknowledgement of this is, in my view, warranted. Plus, by citing the later MISRA-2004,

it leaves the Python implementation in the free and clear.

>I think the idea of early termination of comprehensions has a *much*
>better chance of getting Guido's interest if it helps make the
>behaviour of else clauses on loops more comprehensible without needing

It looks like this has happened.
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130701/08577bed/attachment.html>


More information about the Python-ideas mailing list