Why not allow empty code blocks?

Chris Angelico rosuav at gmail.com
Sun Jul 31 00:07:42 EDT 2016


On Sun, Jul 31, 2016 at 1:12 PM, Gregory Ewing
<greg.ewing at canterbury.ac.nz> wrote:
> Chris Angelico wrote:
>>
>> I mean, "for i in 3.5" should start half way down the loop body, complete
>> that loop, and
>> then do three complete loops.
>
>
> +1, this is the best idea for a "loop-and-a-half"
> construct I've ever seen.

It was inspired by Duff's Device, which could then be implemented very
easily by simply true-dividing by eight. :)

ChrisA



More information about the Python-list mailing list