summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-19 13:22:21 (GMT)
committerGitHub <noreply@github.com>2024-06-19 13:22:21 (GMT)
commit4ce1246a9958d2d1452f83be961e369f7d050714 (patch)
treeec9fbbbf9dbc65cb1473c279f644670d32a4695c /Python
parentc598e61a223edcd9a7eecf823f667e2e810aba53 (diff)
downloadcpython-4ce1246a9958d2d1452f83be961e369f7d050714.zip
cpython-4ce1246a9958d2d1452f83be961e369f7d050714.tar.gz
cpython-4ce1246a9958d2d1452f83be961e369f7d050714.tar.bz2
[3.13] gh-120722: Set position on RETURN_VALUE in lambda (GH-120724) (#120738)
(cherry picked from commit d8f27cb1141fd3575de816438ed80a916c0560ed) Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
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 a24764c..78ed44e 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -3043,7 +3043,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);
}