No project description provided
Project description
Expr Simplifier
🍋🟩 A tool for simplifying Python expressions that don't contain side effects, mainly for generated code
Usage
Quick start in CLI
We recommend using the tool uv
to run the without manually installing the package:
$ uvx expr_simplifier cse "a * 4 + (a * 4)"
(___t_0 := (a * 4)) + ___t_0
$ uvx expr_simplifier constant_folding "(___x := 1 + 1) + ___x" --max-iter=1
(___x := 2) + ___x
$ uvx expr_simplifier constant_folding "(___x := 1 + 1) + ___x" --max-iter=2
4
# uvx expr_simplifier logical_simplification "a and b and a"
a and b
As a library
TODO...
TODOs
- Add runtime checks in uts
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
expr_simplifier-0.1.0.tar.gz
(15.6 kB
view hashes)
Built Distribution
Close
Hashes for expr_simplifier-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c875c441e3037fec4bd066bed6861482eef781f1e6886a89c45b6e74ea2b52ed |
|
MD5 | 660dec23f521354271f934af15e84c5e |
|
BLAKE2b-256 | 8639845ca3d2893a9e1b9e22d4b2c60fa268ebf15828afecc2b5e1a62d89b5c6 |