often I write code like this:
for expression in expressions:
if not expression.isExpressionConstantRef():
That is to search in an iterable, and return based on finding something, or returning in the alternative, I specifically prefer the "else:" branch over merely putting it after the "for" loop.
This triggers the above message, which I consider flawed, because as soon as there is a "raise", or "return", that should be good enough as well. Basically any aborting statement, not only break.
I wanted to hear your opinion on this, pylint bug, or only in my mind.
code-quality mailing list