Skip to content

Conversation

@iritkatriel
Copy link
Member

@iritkatrieliritkatriel commented Jul 2, 2024

compiler_exit_scope(c);
if (is_top_level_await && is_async_generator){
c->u->u_ste->ste_coroutine = 1;
assert(c->u->u_ste->ste_coroutine == 1);
Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this assignment has been obsolete for a while now, see #6766 (comment).

Copy link
Member

@JelleZijlstraJelleZijlstra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree this is a job for the symtable, not the compiler. This looks to be well tested in test_compile_top_level_await in test_builtin.py.

@iritkatrieliritkatriel merged commit 9315688 into python:mainJul 3, 2024
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@iritkatriel@JelleZijlstra