timefold-solver icon indicating copy to clipboard operation
timefold-solver copied to clipboard

jpyinterpreter - Automatic cast to bool for Predicate

Open Christopher-Chianelli opened this issue 1 year ago • 0 comments

If jpyinterpreter detects a non-bool value is being returned in a Predicate, it should automatically cast it to bool.

This is to allow int/object logics in filters (i.e. filter(lambda x: x & 1)), which is allowed in Python, less so in Java.

Christopher-Chianelli avatar Mar 04 '24 18:03 Christopher-Chianelli