-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Code objects, function objects and generator object contain quite a lot of redundant information #100719
Comments
I have no opinion on whether these changes are good or bad, but they are surely breaking changes. Code objects aren't well documented, but they're not private implementation details. How do you plan to manage these changes? |
The |
@stevendaprano The python-level doc for 'internal types', including code objects, https://docs.python.org/3/reference/datamodel.html#codeobject says
'co_nplaincellvars' is not even mentioned in the 3.11 docs. generator objects are not listed here and their internal gi_xxx methods, as opposed to |
There is a quite a lot of redundancy in code, function and generator objects.
Intra-object redundancy
co_nlocalsplus
,co_nplaincellvars
,co_nlocals
,co_nfreevars
. Any of these fields can be computed from the other three.gi_code
field, which is redundant, as the frame contains a reference to the code object.Inter-object redundancy
Linked PRs
co_nplaincellvars
field from code objects. #100721gi_code
field from generator object. #100749The text was updated successfully, but these errors were encountered: