-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed as not planned
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
Constant expresisons like:
1 + 1
are folded in AST optimizer, but constant comparisons are not. For instance:
1 in (1, 2)
3 > 2 > 1
etc...
Proposing to add constant comparison folding. Linking draft PR. No tests yet in case proposal is rejected. cc @Eclips4 as codeowner and AST specialist.
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)performancePerformance or resource usagePerformance or resource usagetype-featureA feature request or enhancementA feature request or enhancement