DEV Community

Discussion on: The 35 Words You Need to Python

Collapse
 
yawpitch profile image
Michael Morehouse

No, sorry, it means that the finally BLOCK, if present at all, must appear below any except BLOCKS that exist and also below the optional else BLOCK, if that exists.

So finally cannot appear above else or except, and else cannot appear above except. Does that clear it up?

Collapse
 
ornataweaver profile image
Ornataweaver • Edited

Thank you for this great Article. I'm still reading it and learning.
It's so much fluent that this sentence was the only hard thing to understand.

You can say "It must be the last of 'except', 'else' or 'finally' blocks, if any of those are present."

Thread Thread
 
yawpitch profile image
Michael Morehouse

Good point, I'll update that to be a little more readable. Thanks!