Skip to content

Warn for large constant exponentiations #33

Description

@LightAndLight

Python will try to constant-fold expressions like 100 ** 123456789, which takes a very long time. Output a warning when this is encountered.

For extra credit, write a refactor rule that will change such occurrences to

a = 123456789
100 ** a

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions