Create a Comparsion object for evaluating whether a variable is inside the given range.
Parameters: |
|
---|---|
Returns: | A Comparsion object whose relation attribute is set to the string “inside” and whose value attribute set to the tuple (value0, value1). |
Examples
>>> c = cf.inside(5,7)
>>> c
<CF Comparison: x inside (5, 7)>
>>> c.evaluate(6)
True
>>> c.evaluate(4)
False