On 7/25/2020 3:11 PM, Christopher Barker wrote:

On Sat, Jul 25, 2020 at 4:39 AM Eric V. Smith <eric@trueblade.com> wrote:

But all of these always make me wonder about a return inside the suite.
Does the "else" part execute (answer: no). So as a rule, I avoid the
construct entirely,

really? does an if-else clause execute if there's a return in the if? no. why would this be any more confusing?

Because I always remember "for ... else" has something to do with leaving the loop early, but I don't recall if it's more like try ... finally, or if it's related to the loop exiting early, or the loop not exiting early, or something else I can't recall.

So, the answer to your "really?" question is "yes".