GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — gh-123881: make compiler add the .generic_base base class without constructing AST nodes by iritkatriel · Pull Request #123883 · python/cpython Conversation
|
|
When you're done making the requested changes, leave the comment: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This is true anyway, the AST currently gives no indication that |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| asdl_seq_SET(bases, original_len, name_node); | ||
| RETURN_IF_ERROR_IN_SCOPE(c, codegen_call_helper(c, loc, 2, | ||
| bases, | ||
| s->v.ClassDef.bases, |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
If it's important to you to remove the code creating a fake AST node here, you could instead add an extra argument to codegen_call_helper that is usually NULL and maps to an extra argument to add at the end of the list. I think I did that initially while working on PEP 695, but it seemed worse than creating a new virtual asdl_seq as the current code does. (Possibly you were involved in discussing that in person, don't remember exactly.)
But I'd like to keep the extra base class as an implementation detail in the compiler, not something that gets exposed in the AST layer.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll try something like that, should be quite simple.
It's possible I was involved in the discussion at the time, I don't remember the details.
I think it would be better if the compiler didn't need to know how to create AST nodes. (I take your point about it not modifying the AST, I'll correct the wording in the issue)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I found back the discussion from last time: #103764 (comment).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I have made the requested changes; please review again. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for making the requested changes! @JelleZijlstra: please review the changes made to this pull request. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Compiler should not need to know how to construct AST nodes
There was an error while loading. Please reload this page.