Skip to content

Commit 4583525

Browse files
bpo-35798: Fix duplicate SyntaxWarning: "is" with a literal. (GH-11639)
1 parent 62e4481 commit 4583525

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Python/compile.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,11 +2404,11 @@ compiler_jump_if(struct compiler *c, expr_ty e, basicblock *next, int cond)
24042404
return 1;
24052405
}
24062406
case Compare_kind: {
2407-
if (!check_compare(c, e)) {
2408-
return 0;
2409-
}
24102407
Py_ssize_t i, n = asdl_seq_LEN(e->v.Compare.ops) - 1;
24112408
if (n > 0) {
2409+
if (!check_compare(c, e)) {
2410+
return 0;
2411+
}
24122412
basicblock *cleanup = compiler_new_block(c);
24132413
if (cleanup == NULL)
24142414
return 0;

0 commit comments

Comments
 (0)