Skip to content

Commit ed60aa8

Browse files
committed
simplify
1 parent 44d19be commit ed60aa8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Python/codegen.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5306,23 +5306,19 @@ codegen_subscript(compiler *c, expr_ty e)
53065306
}
53075307
else {
53085308
VISIT(c, expr, e->v.Subscript.slice);
5309-
int op = 0;
53105309
switch (ctx) {
53115310
case Load:
53125311
ADDOP_I(c, loc, BINARY_OP, NB_SUBSCR);
53135312
break;
53145313
case Store:
5315-
op = STORE_SUBSCR; break;
5314+
ADDOP(c, loc, op);
53165315
break;
53175316
case Del:
5318-
op = DELETE_SUBSCR; break;
5317+
ADDOP(c, loc, op);
53195318
break;
53205319
default:
53215320
Py_UNREACHABLE();
53225321
}
5323-
if (op) {
5324-
ADDOP(c, loc, op);
5325-
}
53265322
}
53275323
return SUCCESS;
53285324
}

0 commit comments

Comments
 (0)