Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for decimal.Decimal and other numerical types as an alternative to float #20

Open
ezekielnewren opened this issue Sep 29, 2021 · 1 comment
Assignees

Comments

@ezekielnewren
Copy link

I'd like there be an option like parser = BaseArithmeticParser(numerical_types=[int, Decimal, complex]) where if numerical_types=None it would default to the value numerical_types=[int, float, complex] so that when I'm dealing with monetary values I can be confident that the answer IS EXACT, not really super close.

@ptmcg
Copy link
Member

ptmcg commented Sep 29, 2021

Interesting idea, I'll look into it.

@ptmcg ptmcg self-assigned this Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants