#14 Translate Python 'bool' to CLIPS symbols and vice-versa

Francesco Garosi

It can be considered valuable that, when converting
Python boolean values (type 'bool') to CLIPS, they get
translated to the corresponding CLIPS SYMBOL (one of
TRUE, FALSE). For completeness, also the opposite
operation, of converting said SYMBOLs to the
corresponding bool value, should be performed when
returning values from CLIPS.


  • Logged In: YES

    Another solution which otherwise makes the required feature
    possible has been implemented, thus the feature request has
    been dropped.

  • Logged In: YES

    Together with the user that proposed this enhancement, we
    have agreed on the fact that the conversion from CLIPS to
    Python would be too arbitrary, as TRUE and FALSE are just
    conventionally treated as boolean values.

    Thus, since clips.Symbol('FALSE') already evaluates to False
    in Python (though remaining a SYMBOL, with all its
    features), we decided to illustrate a way to allow
    semi-automated conversion of items that evaluate to True or
    False in Python to the symbols TRUE and FALSE respectively
    in CLIPS, via a generic function wrapper. This simple
    function wrapper, which can be used to convert more things
    that can be treated as booleans, will be illustrated in the AQ.

    • milestone: 424077 --> Rejected
    • status: open --> closed