cf.inside

cf.inside(value0, value1)

Create a Comparsion object for evaluating whether a variable is inside the given range.

Parameters:
  • value0 (object) – The first element of value attribute tuple in the returned Comparsion object.
  • value1 (object) – The second element of value attribute tuple in the returned Comparsion object.
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

Previous topic

cf.gt

Next topic

cf.le

This Page