summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2022-09-20 19:22:24 (GMT)
committerGitHub <noreply@github.com>2022-09-20 19:22:24 (GMT)
commitdfc73b57247aac575c83055d960c03bdc28b51fd (patch)
tree6a997d0badcb1bfe45d6f4db41ef9d27e61145e0 /Python/compile.c
parent8563966be4f171ccf615105ef9d3a5aa65a1de68 (diff)
downloadcpython-dfc73b57247aac575c83055d960c03bdc28b51fd.zip
cpython-dfc73b57247aac575c83055d960c03bdc28b51fd.tar.gz
cpython-dfc73b57247aac575c83055d960c03bdc28b51fd.tar.bz2
GH-95921: Fix positions for some chained comparisons (GH-96968)
Diffstat (limited to 'Python/compile.c')
-rw-r--r--Python/compile.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 1f1ef56..507fd04 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2905,6 +2905,7 @@ compiler_jump_if(struct compiler *c, expr_ty e, jump_target_label next, int cond
return 1;
}
case Compare_kind: {
+ SET_LOC(c, e);
Py_ssize_t i, n = asdl_seq_LEN(e->v.Compare.ops) - 1;
if (n > 0) {
if (!check_compare(c, e)) {