Skip to content

Conversation

@jtcooper10
Copy link
Collaborator

(See issue #687)

Improves the error handling of the Expression class, and allows for adding Python built-ins to be mapped to C++ ones.

Fixes

  • Expression#getexpr_cpp and Expression#getexpr_python raise a SyntaxError on parsing validation errors, instead of returning None.
  • Adds the Python abs function as a valid function identifier in Expression code.
    • Additional Python built-ins can be introduced by adding an entry to the Expression.function_map dictionary, where the key is the name of the Python function and the value is the C++ equivalent (they can, and often are, the same).

Closes #688

@jtcooper10 jtcooper10 added the bug Something isn't working label Jan 20, 2022
@briandrawert briandrawert added this to the 1.6.8 milestone Jan 24, 2022
@seanebum seanebum merged commit eae9251 into develop Jan 27, 2022
@seanebum seanebum mentioned this pull request Feb 22, 2022
@briandrawert briandrawert deleted the expression-error-handling branch July 25, 2024 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Errors raised by Expression utility class need to be clearer

4 participants