Open 2kays opened 6 months ago
Getting into except from 'try' is not easy because it's a child of the whole try_statement, so sibling navigation from try to except is not possible.
Well, it is, and I did try it for a while, but changing the sibling procedure to handle it breaks in other weird ways: you'd be able to drag an except clause out of a try statement, which makes no sense. This is one of those quirks of how our perception of code does not match the grammar.
You're definitely right that decorators do not behave well at all. That's a bug :)
I can confirm there is no hierarchical nav tool that can get me into except
:
|try:| # nope, nope
|pass| # nope, nope
except KeyError:
pass
I see a double body:
in the explorer:
(try_statement try :
body:
(block
(pass_statement pass))
body:
(except_clause except (identifier) :
(block
(pass_statement pass))))
In Python, hierarchical navigations behave unexpectedly (to me) with annotations and function definitions (in
master
).Example code:
Something similar may also be happening with
try-except
; I'm struggling to get into theexcept
handler.