Condition
Condition
Condition()Relations that evaluate to booleans
Methods
| Name | Description |
|---|---|
__and__ |
Create a condition that is the logical and operation between two conditions (i.e., both should hold). |
__bool__ |
Return the boolean value of the condition. |
__invert__ |
Create a condition that takes the logical ‘not’ of the current condition. |
__or__ |
Create a condition that is the logical ‘or’ operation between two conditions (i.e., at least one of the two should hold). |
__repr__ |
Return a string representation of the condition. |
__str__ |
Return a string representation of the condition. |
eval |
Evaluate the condition. |
to_req |
Convert the condition to a pattern restriction. |
__and__
Condition.__and__(other: Condition) -> ConditionCreate a condition that is the logical and operation between two conditions (i.e., both should hold).
Parameters
other(Condition) The other operand to combine or compare with.
__bool__
Condition.__bool__() -> boolReturn the boolean value of the condition.
__invert__
Condition.__invert__() -> ConditionCreate a condition that takes the logical ‘not’ of the current condition.
__or__
Condition.__or__(other: Condition) -> ConditionCreate a condition that is the logical ‘or’ operation between two conditions (i.e., at least one of the two should hold).
Parameters
other(Condition) The other operand to combine or compare with.
__repr__
Condition.__repr__() -> strReturn a string representation of the condition.
__str__
Condition.__str__() -> strReturn a string representation of the condition.
eval
Condition.eval() -> boolEvaluate the condition.
to_req
Condition.to_req() -> PatternRestrictionConvert the condition to a pattern restriction.