def _filterRecord(filterList, record):
 for (fieldIdx, fp, params) in filterList:
  x = dict()
  x['value'] = record[fieldIdx]
  x['acceptValues'] = params['acceptValues']
  x['min'] = params['min']
  x['max'] = params['max']
  if (not fp(x)):
   return False
 return True

def _filterRecord ( filterList , record ) : for ( fieldIdx , fp , params ) in filterList : x = dict ( ) x [ 'value' ] = record [ fieldIdx ] x [ 'acceptValues' ] = params [ 'acceptValues' ] x [ 'min' ] = params [ 'min' ] x [ 'max' ] = params [ 'max' ] if ( not fp ( x ) ) : return False return True
takes a record and returns true if record meets filter criteria .