Closed yellowhat closed 7 years ago
Hi,
The code block under else
is executed once the for
loop has iterated through all elements without being interrupted by any break
. In this specific case this block should always be executed and it would be equally correct to de-dent it by one level and remove the else
.
You can find for...else
documentation here.
Hi, I was looking to your code especially the function
extract_cycles
in the filerainflow.py
. I don't understand why there is anelse
statement on the same level of thefor
cycle (line 65), infact thebreak
statement is on thewhile
level. Reading/running the code seems that with or without that`else
the code returns exactly the same results. Is it a typo or there a much deeper technical reason due to a specific case?Thanks