a = 42
def foo():
return 42
a == foo()
I'd expect pylint to also warn in this case: W: 5: Statement seems to have no effect | |
| priority | normal |
|---|---|
| type | enhancement |
| appeared in | <not specified> |
| done in | 0.23.0 |
| load | 0.300 |
| load left | 0.000 |
| closed by | <not specified> |


#52020 errors when using python 2.6 properties
Comments
-
2010/12/09 10:20, written by eanclin
| reply to this comment
-
2010/12/09 10:33, written by acampeas
| reply to this comment
(add comment)well, function calls usually have side effects; so do you expect pylint to recognize that some function has no side effect? I would suggest that we add a new warning:
It would be easy to implement and would also occur if the function call has indeed an effect.
indeed and +1