Skip to content

Commit cbb3431

Browse files
committed
address review
1 parent 0fb1999 commit cbb3431

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Python/flowgraph.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,12 +1471,11 @@ fold_constant_intrinsic_list_to_tuple(basicblock *bb, int i,
14711471
{
14721472
assert(PyDict_CheckExact(const_cache));
14731473
assert(PyList_CheckExact(consts));
1474-
assert(i >= 0 && i < bb->b_iused);
1474+
assert(i >= 0);
1475+
assert(i < bb->b_iused);
14751476
cfg_instr *intrinsic = &bb->b_instr[i];
1476-
assert(
1477-
intrinsic->i_opcode == CALL_INTRINSIC_1 &&
1478-
intrinsic->i_oparg == INTRINSIC_LIST_TO_TUPLE
1479-
);
1477+
assert(intrinsic->i_opcode == CALL_INTRINSIC_1);
1478+
assert(intrinsic->i_oparg == INTRINSIC_LIST_TO_TUPLE);
14801479

14811480
PyObject *list = PyList_New(0);
14821481
if (list == NULL) {
@@ -2384,11 +2383,12 @@ optimize_basic_block(PyObject *const_cache, basicblock *bb, PyObject *consts)
23842383
RETURN_IF_ERROR(fold_const_unaryop(bb, i, consts, const_cache));
23852384
break;
23862385
case CALL_INTRINSIC_1:
2387-
// for _ in (*foo, *bar) -> for _ in [*foo, *bar]
23882386
if (oparg == INTRINSIC_LIST_TO_TUPLE) {
2387+
// for _ in (*foo, *bar) -> for _ in [*foo, *bar]
23892388
if (nextop == GET_ITER) {
23902389
INSTR_SET_OP0(inst, NOP);
2391-
} else {
2390+
}
2391+
else {
23922392
fold_constant_intrinsic_list_to_tuple(bb, i, consts, const_cache);
23932393
}
23942394
}

0 commit comments

Comments
 (0)