On Mon, Dec 8, 2014 at 2:07 PM, Skip Montanaro <skip.montan...@gmail.com> wrote: > > On Mon, Dec 8, 2014 at 1:32 PM, Phil Frost <ind...@bitglue.com> wrote: >> >> Maybe. As a matter of principle, Pyflakes should only emit a warning for >> things that it is sure is an error. > > > The avoidance of false positives is a noble goal, but given the dynamic > nature of Python, I'm happy to put up with a few if it means flagging stuff > that is likely to be an error. > > Skip
I'm not sure in what case code like what Skip shared wouldn't result in an error: for i in range(1, 10): for i in ['foo', 'frob', 'bob', 'bogus', 'smogus']: do_stuff(i) do_other_stuff(i) do_other_stuff will probably raise a TypeError if it's expecting an int instead of a string (and is doing something that cannot be done to both). I'm fairly confident this will be an error in most cases and for the people for whom it will be a false positive, it will maybe teach them to write better loop variable names. _______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality