summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>2023-10-21 12:38:29 (GMT)
committerGitHub <noreply@github.com>2023-10-21 12:38:29 (GMT)
commitb578e51f026a45576930816d6784697192ed472e (patch)
tree80c166fec30df2d8fcbbd17d00868d565aed1c38 /Python
parentf71cd5394efe154ba92228b2b67be910cc1ede95 (diff)
downloadcpython-b578e51f026a45576930816d6784697192ed472e.zip
cpython-b578e51f026a45576930816d6784697192ed472e.tar.gz
cpython-b578e51f026a45576930816d6784697192ed472e.tar.bz2
gh-111123: symtable should visit exception handlers before the else block (#111142)
Diffstat (limited to 'Python')
-rw-r--r--Python/symtable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/symtable.c b/Python/symtable.c
index 75ea9e9..da7fec0 100644
--- a/Python/symtable.c
+++ b/Python/symtable.c
@@ -1813,14 +1813,14 @@ symtable_visit_stmt(struct symtable *st, stmt_ty s)
break;
case Try_kind:
VISIT_SEQ(st, stmt, s->v.Try.body);
- VISIT_SEQ(st, stmt, s->v.Try.orelse);
VISIT_SEQ(st, excepthandler, s->v.Try.handlers);
+ VISIT_SEQ(st, stmt, s->v.Try.orelse);
VISIT_SEQ(st, stmt, s->v.Try.finalbody);
break;
case TryStar_kind:
VISIT_SEQ(st, stmt, s->v.TryStar.body);
- VISIT_SEQ(st, stmt, s->v.TryStar.orelse);
VISIT_SEQ(st, excepthandler, s->v.TryStar.handlers);
+ VISIT_SEQ(st, stmt, s->v.TryStar.orelse);
VISIT_SEQ(st, stmt, s->v.TryStar.finalbody);
break;
case Assert_kind: