diff options
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Python/compile.c b/Python/compile.c index 91ce04b..2a086a5 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -2546,13 +2546,12 @@ compiler_if(struct compiler *c, stmt_ty s) return 0; constant = expr_constant(s->v.If.test); - /* constant = 0: "if 0" + /* constant = 0: "if 0" Leave the optimizations to + * the pephole optimizer to check for syntax errors + * in the block. * constant = 1: "if 1", "if 2", ... * constant = -1: rest */ - if (constant == 0) { - if (s->v.If.orelse) - VISIT_SEQ(c, stmt, s->v.If.orelse); - } else if (constant == 1) { + if (constant == 1) { VISIT_SEQ(c, stmt, s->v.If.body); } else { if (asdl_seq_LEN(s->v.If.orelse)) { |