The following comparison operators methods take an input sequence argument, and produce the boolean result sequence by applying the specified comparison operator on the object's sequence and the corresponding elements in the input sequence.
If the two input sequence arguments are of different lengths the operation will be performed on only the number of elements in the shorter of the two sequences.
The operator can be one of the following:
eq( input ) The element of the result sequence is truefor corresponding elements that are equal in the input sequence; otherwisefalsene( input ) The element of the result sequence is truefor corresponding elements that are not equal in the input sequence; otherwisefalsegt( input ) The element of the result sequence is truefor corresponding elements where the object's element is greater than the input; otherwisefalsege( input ) The element of the result sequence is truefor corresponding elements where the object's element is greater than or equal to the input; otherwisefalselt( input ) The element of the result sequence is truefor corresponding elements where the object's element is less than the input; otherwisefalsele( input ) The element of the result sequence is truefor corresponding elements where the object's element is less than or equal to the input; otherwisefalseExample
Following is an example code snippet demonstrating a comparison operator method:
cursor = con.cursor("Quote", "by_sym") for quote in cursor: ... eqIterator = quote.high.eq(quote.close) ...