optapy / optapy

OptaPy is an AI constraint solver for Python to optimize planning and scheduling problems.

Home Page:https://www.optapy.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jpyinterpreter - Automatic cast to bool for Predicate

Christopher-Chianelli opened this issue · 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.