Expr-py

Latest version: v0.3.0

Safety actively analyzes 623739 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.3.0

What's new?
- Unary plus is now supported (E.g. `+5`)
- Scientific notation is now supported (E.g. `4E-2`)
- To reduce conflics, 'E' __must__ be captialized.
This means that `2e9` would evaluate to `2 * e * 9`, for example.
- The `cls` kwarg is now supported in `expr.evaluate`
- Passing in `None` to the limit kwargs will now remove the limit.

Bug fixes
- Catch `OverflowError` in the `expr.Overflow` parsing error.
- Fix invalid typings with `Callable`

0.2

for boosts on both performance and precision.

- `sqrt` now uses `Decimal.sqrt`
- `log10` now uses `Decimal.log10`
- `ln` now uses `Decimal.ln`
- `cbrt` now uses `input ** expr.one_third`
- `sin` now uses `expr.sin`
- `cos` now uses `expr.cos`

Bug fixes
- Fixed unary minus interfering with implicit multiplication.
- in v0.1: `5-3` = `-15`
- in v0.2: `5-3` = `2`

Miscellaneous
- Many functions now have positional-only arguments for slight performance boosts
- This drops support for Python 3.7
- Messages retrieved from `ParsingError.friendly` are now much more descriptive.

0.2.0

This update mainly brings bug fixes from v0.1.
What's new?
- You can now pass in custom classes into `Parser.evaluate`
- Constants are now precise to around 30 places.
- New constants (`phi`, `tau`)

**More precise builtin functions**

0.1.0

Initial stable release.

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.