From 7674c83d81905d6afe989ca3f93f08b7939b057c Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Mon, 21 Jun 2021 11:47:16 +0100 Subject: bpo-44297: Fix missing line number in generator expressions (GH-26821) * Make sure that line number is set when entering comprehension scope in compiler. (cherry picked from commit 82e5c28af7049c4f5343c808f172cbe2e145f49b) --- Python/compile.c | 1 + 1 file changed, 1 insertion(+) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 4abc9f05ea..7dc04923af 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -4799,6 +4799,7 @@ compiler_comprehension(struct compiler *c, expr_ty e, int type, { goto error; } + SET_LOC(c, e); is_async_generator = c->u->u_ste->ste_coroutine; -- cgit v1.2.1