mirror of
https://github.com/python/cpython.git
synced 2025-07-23 11:15:24 +00:00
[3.8] bpo-37947: Adjust correctly the recursion level in symtable for named expressions (GH-15499) (GH-15515)
(cherry picked from commit 0e4ea16336
)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
69d22b8fee
commit
3769425abd
2 changed files with 5 additions and 1 deletions
|
@ -1508,6 +1508,7 @@ symtable_handle_namedexpr(struct symtable *st, expr_ty e)
|
|||
}
|
||||
VISIT(st, expr, e->v.NamedExpr.value);
|
||||
VISIT(st, expr, e->v.NamedExpr.target);
|
||||
VISIT_QUIT(st, 1);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1520,7 +1521,8 @@ symtable_visit_expr(struct symtable *st, expr_ty e)
|
|||
}
|
||||
switch (e->kind) {
|
||||
case NamedExpr_kind:
|
||||
symtable_handle_namedexpr(st, e);
|
||||
if(!symtable_handle_namedexpr(st, e))
|
||||
VISIT_QUIT(st, 0);
|
||||
break;
|
||||
case BoolOp_kind:
|
||||
VISIT_SEQ(st, expr, e->v.BoolOp.values);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue