Skip to content

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Jul 15, 2021

END_ASYNC_FOR can only follow the iterator, so giving it the same line number as the iterator is correct even though END_ASYNC_FOR is artificial.

By giving END_ASYNC_FOR a real line number, any artificial code following it gets a meaningful line number.

https://bugs.python.org/issue44622

Copy link
Member

@pablogsal pablogsal left a comment

Choose a reason for hiding this comment

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

LGTM but I would recommend to add a comment about this near the change so is a gir clear why the artificial instruction is getting a line number

@markshannon markshannon merged commit f333ab0 into python:main Jul 15, 2021
@miss-islington
Copy link
Contributor

Thanks @markshannon for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @markshannon, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker f333ab0f2edec26a769ed558263ac662e5475451 3.10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants