Skip to content

Commit

Permalink
not not no but no
Browse files Browse the repository at this point in the history
  • Loading branch information
JelleZijlstra committed Jul 13, 2024
1 parent e226b56 commit 07d5488
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Python/symtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit 07d5488

Please sign in to comment.