Skip to content

Add codeobject.co_positions() for Python 3.11 #6339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2021

Conversation

lancelote
Copy link
Contributor

Hi!

I hope it is OK to start adding stuff from Python 3.11. I am ready to update the code in case of any changes to the API in the following alpha/beta versions.

co_positions() is the new codeobject method introduced in PEP 657 to retrieve source code positions of bytecode instructions. See

Thank you 🙇‍♂️

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Looks good, thanks! It's never too early to start adding new features.

@github-actions
Copy link
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

@JelleZijlstra JelleZijlstra merged commit 42fa843 into python:master Nov 18, 2021
@lancelote lancelote deleted the co_positions branch November 18, 2021 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants