cf.le

cf.le(value)

Create a Comparsion object for evaluating whether a variable is less than or equal to the given value.

Parameters:value (object) – The value attribute in the returned Comparsion object.
Returns:A Comparsion object whose relation attribute is set to the string “le” and whose value attribute set to the value parameter.

Examples

>>> c = cf.le(5)
>>> c
<CF Comparison: x le 5>
>>> c.evaluate(5)
True
>>> c.evaluate(6)
False

Previous topic

cf.inside

Next topic

cf.lt

This Page