We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4663f66 commit d5aa2e9Copy full SHA for d5aa2e9
Python/compile.c
@@ -3765,7 +3765,6 @@ assignment_helper(struct compiler *c, asdl_seq *elts)
3765
"star-unpacking assignment");
3766
ADDOP_I(c, UNPACK_EX, (i + ((n-i-1) << 8)));
3767
seen_star = 1;
3768
- asdl_seq_SET(elts, i, elt->v.Starred.value);
3769
}
3770
else if (elt->kind == Starred_kind) {
3771
return compiler_error(c,
@@ -3775,7 +3774,10 @@ assignment_helper(struct compiler *c, asdl_seq *elts)
3775
3774
if (!seen_star) {
3776
ADDOP_I(c, UNPACK_SEQUENCE, n);
3777
3778
- VISIT_SEQ(c, expr, elts);
+ for (i = 0; i < n; i++) {
+ expr_ty elt = asdl_seq_GET(elts, i);
3779
+ VISIT(c, expr, elt->kind != Starred_kind ? elt : elt->v.Starred.value);
3780
+ }
3781
return 1;
3782
3783
0 commit comments