I saw that there are two new features in Python 3:
StopIteration
can be given a value by areturn
statementfor
loop has theelse
part that is executed when theStopIteration
happens
Seems that it is reasonable to be able to work with the StopIteration.value
in the else
clause, but I cannot find any reference to it.