summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorJelle Zijlstra <jelle.zijlstra@gmail.com>2024-06-19 12:56:36 (GMT)
committerGitHub <noreply@github.com>2024-06-19 12:56:36 (GMT)
commitd8f27cb1141fd3575de816438ed80a916c0560ed (patch)
treefe5d07063bc23540fc59003a76a65d2eff691c92 /Python
parenta86e6255c371e14cab8680dee979a7393b339ce5 (diff)
downloadcpython-d8f27cb1141fd3575de816438ed80a916c0560ed.zip
cpython-d8f27cb1141fd3575de816438ed80a916c0560ed.tar.gz
cpython-d8f27cb1141fd3575de816438ed80a916c0560ed.tar.bz2
gh-120722: Set position on RETURN_VALUE in lambda (#120724)
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 53fe6db..18c507b 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -2968,7 +2968,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);
}