I'm missing something here...
Cameron Simpson
cs at zip.com.au
Tue Jan 12 02:13:22 EST 2016
On 11Jan2016 23:55, Erik <python at lucidity.plus.com> wrote:
>On 11/01/16 23:26, Skip Montanaro wrote:
>>If I change the last line of find_problems to call
>>prob_dates.update(), the message disappears. Why is pylint (1.4.2 BTW)
>>complaining that the prob_dates argument of find_problems is unused
>>when I use the |= operator?
>
>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.
Cheers,
Cameron Simpson <cs at zip.com.au>
More information about the Python-list
mailing list