Toolkits > com.ibm.streamsx.topology.pysamples 1.1.0 > com.ibm.streamsx.topology.pysamples.positional > SimpleFilter
Filter tuples only allowing output if the first attribute is less than the second.
Returns the sum of the first two attributes.
@spl.map(style='position')
def SimpleFilter(a,b):
"""
Filter tuples only allowing output if the first attribute is less than the second.
Returns the sum of the first two attributes.
"""
if (a < b):
return a+b,
Tuple attribute values are passed by position to the Python callable.