I'm missing something here...

Erik python at lucidity.plus.com
Tue Jan 12 03:24:45 EST 2016


On 12/01/16 07:13, Cameron Simpson wrote:
> On 11Jan2016 23:55, Erik <python at lucidity.plus.com> wrote:
>> Is it complaining about that, or is it because the 'for' loop body
>> might be executed zero times?
>
> The former. Almost any loop _might_ be executed zero times. Compilers
> and linters etc should only complain if they can prove the loop is
> always executed zero times.

Sure, but Skip was thinking he'd found a bug - I was just raising the 
possibility that the bug could have been that the loop was (incorrectly) 
determined to be executed zero times for some reason.

E.




More information about the Python-list mailing list