Skip to content

Conversation

@reidenong
Copy link
Contributor

@reidenongreidenong commented Jan 22, 2026

This uses the new predicate optimizer symbol to narrow types to constants in branches involving comparisons with a constant.

This PR provides the implementation for _COMPARE_OP_INT , _COMPARE_OP_STR, _COMPARE_OP_FLOAT.

@reidenong
Copy link
ContributorAuthor

After discussion with Ken Jin I will be adding implementations for all _COMPARE_OP_* in this PR

@reidenongreidenong changed the title gh-130415: Narrow types to constants in branches involving comparisons with a constantgh-130415: Narrow types to constants in branches involving specialized comparisons with a constantJan 22, 2026
Copy link
Member

@Fidget-SpinnerFidget-Spinner left a comment

Choose a reason for hiding this comment

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

Thanks

@Fidget-SpinnerFidget-Spinner merged commit 6d972e0 into python:mainJan 24, 2026
68 of 69 checks passed
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@reidenong@Fidget-Spinner