summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2022-09-20 22:26:56 (GMT)
committerGitHub <noreply@github.com>2022-09-20 22:26:56 (GMT)
commitaced809dc484744c282be10799169bbdd50d65e2 (patch)
tree77da6290e29f518ea890ee32935965b060650ecd /Python/compile.c
parent21b5af9072a43275d52737a68d5cda2fab47f730 (diff)
downloadcpython-aced809dc484744c282be10799169bbdd50d65e2.zip
cpython-aced809dc484744c282be10799169bbdd50d65e2.tar.gz
cpython-aced809dc484744c282be10799169bbdd50d65e2.tar.bz2
[3.10] GH-95921: Fix positions for some chained comparisons (GH-96968) (GH-96974)
(cherry picked from commit dfc73b57247aac575c83055d960c03bdc28b51fd) Automerge-Triggered-By: GH:brandtbucher
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 40d1761..e5438f7 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2691,6 +2691,7 @@ compiler_jump_if(struct compiler *c, expr_ty e, basicblock *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)) {