PEP 601: Forbid return/break/continue breaking out of finally

I agree with this change. For me there is a much simpler, more compelling example (maybe it’s worth including in the PEP):

def f() -> bool:
    try:
        return True
    finally:
        return False

What does f() return?

2 Likes