See image (old effect). The try block has one single line. Why should the finally block have two?
An alternative would be to finish the "try" at the finally, and start a new section only for the finally.
1) IMHO the "try" is ended by the "end" not by the "finally". But that may be a matter of view? (at least for everyone’s personal editor behaviour, not for a language design level)
2) This would require changes to folding. The outline is based on the folding. If the outline should see the "finally" as end point of the "try" then folding a "try" would also only fold down to that "finally" (while currently it folds to the "end" statement)
Well actually, it could be decoupled with "hidden folds" for the outline...
Maybe there are other ways to decouple from folding, would need research.
Or would different folding behaviour for this actually be wanted?
Throwing in an unrelated idea, that has been living in the back of my head for a while (waiting for a good moment to steal its way onto my schedule).
So if anyone wants to throw in some feedback on that: "color groups" for the outline.
Example
- "Group 1", user groups try/finally/except, user sets different shade of red for different nesting levels
- "Group 2", user groups while/repeat/for, user sets different shade of blue for different nesting levels
- "Group 3" the rest. Any other color
Then when looking at your code, the colors immediately tell you:
- red-ish => code is governed by try/finally/except
- blue-ish => code is in some form of loop