-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
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
gh-100117: Fix inaccuracy in documentation of the CodeObject's co_positions field. #119364
Conversation
…co_positions field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One comment, but not important.
Doc/reference/datamodel.rst
Outdated
Column information is 0-indexed utf-8 byte offsets on the given source | ||
line. | ||
position of the source code that compiled to the *i-th* code unit. A | ||
code unit is either a bytecode instruction or a cache entry of an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be pedantic, cache entries can span several code units, as can the instruction if the EXTENDED_ARG
prefix is included.
Maybe just use "code unit" here, and explain the instruction format elsewhere (in another PR)
Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12, 3.13. |
…co_positions field. (pythonGH-119364) (cherry picked from commit 015b1fd) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
…co_positions field. (pythonGH-119364) (cherry picked from commit 015b1fd) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
GH-119869 is a backport of this pull request to the 3.13 branch. |
…co_positions field. (pythonGH-119364) (cherry picked from commit 015b1fd) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
GH-119870 is a backport of this pull request to the 3.12 branch. |
GH-119871 is a backport of this pull request to the 3.11 branch. |
…co_positions field. (python#119364)
…co_positions field. (python#119364)
Fixes #100117.
📚 Documentation preview 📚: https://cpython-previews--119364.org.readthedocs.build/