Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I am opening this PR to reconstruct named-argument calls in pycdc's bounded expression walker while preserving their enclosing call. The code below currently produces incomplete output:
The incorrect output calls
Noneon one branch:The main parser supports named calls, but its bounded expression walker lacks
CALL_KWsupport. The added handler reads the keyword-name tuple, checks its string entries and argument counts, separates positional from named arguments, and consumes the callable/NULL marker in the existing stack convention. This retains keyword names and argument evaluation order instead of turning the call into an unparseable region or a wrong positional call.The ternary merger must also retain a keyword-bearing call when merging its argument values. It matches keyword names and order and includes their values alongside positional values in its single-slot merge. This supports both a conditional positional argument and a conditional keyword argument:
An arm-local callable or argument prefix must not be mistaken for a value preloaded before the condition. The bounded merger declines that shape rather than moving callable resolution or argument evaluation across the truth test.
CALL_KWis introduced in Python 3.13; the added decoding applies to that opcode layout.