summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2024-06-19 13:19:39 (GMT)
committerGitHub <noreply@github.com>2024-06-19 13:19:39 (GMT)
commitd62cbba235df1199b8b2556d2016d37522608973 (patch)
tree34c140c38856b137e11224509d8e3ee6ec13cb2e /Python
parentcde976d85c6632a908dde1ff8695ac5cafd879b6 (diff)
downloadcpython-d62cbba235df1199b8b2556d2016d37522608973.zip
cpython-d62cbba235df1199b8b2556d2016d37522608973.tar.gz
cpython-d62cbba235df1199b8b2556d2016d37522608973.tar.bz2
[3.12] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120739)
(cherry picked from commit d8f27cb1141fd3575de816438ed80a916c0560ed)
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 5e96a9665..bd1650e 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2966,7 +2966,7 @@ compiler_lambda(struct compiler *c, expr_ty e)
co = optimize_and_assemble(c, 0);
}
else {
- location loc = LOCATION(e->lineno, e->lineno, 0, 0);
+ location loc = LOC(e->v.Lambda.body);
ADDOP_IN_SCOPE(c, loc, RETURN_VALUE);
co = optimize_and_assemble(c, 1);
}