Do comparisons involving abstract values.
Exception |
|
Comparing incompatible primitive constants. |
Function | cmp |
Compare two variables. |
Function | compatible |
Returns the conditions under which the value could be True or False. |
Constant | NUMERIC |
Undocumented |
Constant | STRING |
Undocumented |
Function | _compare |
Checks if the values are constant tuples and compares them if so. |
Function | _compare |
Undocumented |
Function | _compare |
Compares a tuple's constant prefix against a constant tuple. |
Function | _compare |
Undocumented |
Function | _compare |
Undocumented |
Function | _compare |
Undocumented |
Function | _compare |
Undocumented |
Function | _compare |
Compare sequence lengths for pattern matching. |
Function | _compare |
Undocumented |
Function | _get |
Given a tuple, get its longest prefix of constant elements. |
Function | _incompatible |
Incompatible primitive types can never be equal. |
Function | _is |
Undocumented |
Function | _is |
Undocumented |
Function | _is |
Undocumented |
Constant | _CONTAINER |
Undocumented |
Returns the conditions under which the value could be True or False. Args: value: An abstract value. logical_value: Either True or False. Returns: False: If the value could not evaluate to logical_value under any circumstance (e.g. value is the empty list and logical_value is True). True: If it is possible for the value to evaluate to the logical_value, and any ambiguity cannot be resolved by additional bindings.
Undocumented
Value |
|
Compares a tuple's constant prefix against a constant tuple. Args: op: A comparison operator, such as LT (less than). prefix: A constant prefix of a non-constant tuple (referred to as "left" in the inline comments). So if left=(3, 2, ...), prefix=(3, 2). constant_tuple: A constant tuple (referred to as "right"). reverse: Whether left and right should be reversed for the comparison. Returns: A bool of the comparison result if it can be determined, None otherwise.
abstract.SequenceLength
, right: abstract.ConcreteValue
):
(source)
¶
Compare sequence lengths for pattern matching.