stop-iteration-return / R1708#
Do not raise StopIteration in generator, use return statement instead
According to PEP479, the raise of StopIteration to end the loop of a generator may lead to hard to find bugs. This PEP specify that raise StopIteration has to be replaced by a simple return statement
# This is a placeholder for correct code for this message.
You can help us make the doc better by contributing !
Created by the refactoring checker.