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

Add a check function #17

Open
yds12 opened this issue Sep 10, 2022 · 0 comments
Open

Add a check function #17

yds12 opened this issue Sep 10, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@yds12
Copy link
Owner

yds12 commented Sep 10, 2022

This function would receive an expression and return a boolean indicating whether the expression is valid.

The use case for this is that it should be significantly faster than eval since we don't have to evaluate anything. In particular, we wouldn't need to call parse which is the slowest part of eval.

We can try to use something like the Mode pattern described here to avoid code duplication between eval and check.

@yds12 yds12 added the enhancement New feature or request label Sep 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant