summaryrefslogtreecommitdiff
path: root/Python/compile.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2019-02-16 08:29:46 +0200
committerGitHub <noreply@github.com>2019-02-16 08:29:46 +0200
commit4583525835baf8fc7bd49a60725d1e8c49ef92b3 (patch)
treead2d13062b3ce30238311a818470755f2dc1a86f /Python/compile.c
parent62e4481238b82f111ffb1104a4b97099dd83ae2b (diff)
downloadcpython-git-4583525835baf8fc7bd49a60725d1e8c49ef92b3.tar.gz
bpo-35798: Fix duplicate SyntaxWarning: "is" with a literal. (GH-11639)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 7565d3c480..18877d96da 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2404,11 +2404,11 @@ compiler_jump_if(struct compiler *c, expr_ty e, basicblock *next, int cond)
return 1;
}
case Compare_kind: {
- if (!check_compare(c, e)) {
- return 0;
- }
Py_ssize_t i, n = asdl_seq_LEN(e->v.Compare.ops) - 1;
if (n > 0) {
+ if (!check_compare(c, e)) {
+ return 0;
+ }
basicblock *cleanup = compiler_new_block(c);
if (cleanup == NULL)
return 0;