The "loop and a half"
Robin Becker
robin at reportlab.com
Wed Oct 4 09:02:22 EDT 2017
On 04/10/2017 11:57, Rhodri James wrote:
> On 04/10/17 10:01, Robin Becker wrote:
>> Given the prevalence of the loop and a half idea in python I wonder why we
>> don't have a "do" or "loop" statement to start loops without a test.
>
> See PEP 315. Guido's rejection note is here:
> https://mail.python.org/pipermail/python-ideas/2013-June/021610.html
>
seems fair enough; I suppose the cost is negligible or perhaps there's peephole
optimization for this common case.
--
Robin Becker
More information about the Python-list
mailing list