To get traditional left-to-right short-circuiting evaluation of logical operators, as in C or other languages (also called "McCarthy Evaluation"), the expression e1 && e2 can be rewritten e1 ? e2 : false. Similarly, e1 || e2 can be rewritten e1 ? true : e2.
cel-python used to evaluate the full tree before deciding if a branch will be used or not. This PR only evaluates a branch if selected by the condition.
The CEL language definition suggests:
cel-python
used to evaluate the full tree before deciding if a branch will be used or not. This PR only evaluates a branch if selected by the condition.Fixes https://github.com/cloud-custodian/cel-python/issues/50