[Python-ideas] PEP 315: do-while
Andrew Barnert
abarnert at yahoo.com
Thu Jun 27 01:17:37 CEST 2013
From: "jimjhb at aol.com" <jimjhb at aol.com>
Sent: Wednesday, June 26, 2013 1:48 PM
>Sounds good to me. Just let people know it's OK to use breaks!!!
>
>
>MISRA-C 1998 (I know it's C, but people extrapolated that to other languages) banned continues and breaks.
>MISRA-C 2004 allowed for one break in a loop.
In case it's not obvious how ridiculous it is to extrapolate MISRA-C to other languages…
I went through the 127 rules in MISRA-C 1998. About 52 of them could be extrapolated to Python. Of those, 20 make some sense; the other 32 would be either ridiculous or disastrous to apply in Python. (In fact, much the same is true even for more closely-related languages like C++ or JavaScript.)
If you're curious about the details, see http://stupidpythonideas.blogspot.com/2013/06/misra-c-and-python.html.
More information about the Python-ideas
mailing list