cf.eq

cf.eq(value)

Create a Comparsion object for evaluating whether a variable is 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 “eq” and whose value attribute set to the value parameter.

Examples

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

Previous topic

cf.dump

Next topic

cf.ge

This Page