Skip to content

Warn for large constant exponentiations #33

@LightAndLight

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

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