On 11Jan2016 23:55, Erik <pyt...@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 <c...@zip.com.au>
--
https://mail.python.org/mailman/listinfo/python-list