for loop without variable

Sam samuel.progin at
Thu Jan 10 08:43:19 CET 2008

> Unfortunately, I don't *think* I can shut the
> warning for that line or function off, only for the entire file.
> Pylint gives you a rating of your quality of code which I think is

wrong :)

# pylint: disable-msg=XXXXX will only impact the current line!

$ cat -n
1  for i in range(2):   # pylint: disable-msg=W0612
2      print "foo"
3  for i in range(2):
4      print "foo"

pylint will not generate a warning on line 1, but will on line 3!



More information about the Python-list mailing list