[Python-projects] PyLint: treatment of empty statement
Maarten ter Huurne
maarten.ter.huurne at philips.com
Thu Jun 15 18:36:25 CEST 2006
Hi,
If you run PyLint on the following program:
===
pass;
===
(note the semicolon)
It says:
===
W0104: 0: Statement seems to have no effect
===
The first problem is that the line number is not filled in (0). This also
happens if the source file is much longer than 1 line.
The second problem is that the message is confusing. Probably it means the
empty statement after the semicolon has no effect. It would be better in
my opinion to have a separate warning for superfluous semicolons (so
making the presence of the empty statement the problem, not the fact that
it does nothing). Alternatively, "C0321: More than one statement on a
single line" could be issued, although that is not as clear as a separate
warning in my opinion.
Bye,
Maarten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.logilab.org/pipermail/python-projects/attachments/20060615/338a39d3/attachment.html
More information about the Python-Projects
mailing list