Skip to content

Add tests for ast optimizations #122666

Closed
Closed
@Eclips4

Description

@Eclips4

Feature or enhancement

Proposal:

Currently we have a one test case which testing that optimize parameter for ast.parse is working as expected.

I propose to add tests for these ast optimizations:

  • Optimization for binary operations if left and right operands are constants
  • Optimization for unary operations if operand is constant
  • Optimization for in operator if right operand is constant list or set
  • Folding of tuples
  • Subscription for constant sequences (tuple, string)

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions