From 07d5488c0238ab9344c4b47de6609b8f1d819d43 Mon Sep 17 00:00:00 2001 From: Jelle Zijlstra Date: Fri, 12 Jul 2024 18:43:22 -0700 Subject: [PATCH] not not no but no --- Python/symtable.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Python/symtable.c b/Python/symtable.c index 167435eef56b5c..4fc98647b29d1a 100644 --- a/Python/symtable.c +++ b/Python/symtable.c @@ -2296,7 +2296,7 @@ symtable_visit_expr(struct symtable *st, expr_ty e) st->st_cur->ste_type == FunctionBlock && st->st_cur->ste_coroutine ); - if (!is_async_def && st->st_cur->ste_comprehension != NoComprehension) { + if (!is_async_def && st->st_cur->ste_comprehension == NoComprehension) { PyErr_SetString(PyExc_SyntaxError, "'await' outside async function"); SET_ERROR_LOCATION(st->st_filename, LOCATION(e));