def newer_pairwise(sources, targets):
 if (len(sources) != len(targets)):
  raise ValueError, "'sources' and 'targets' must be same length"
 n_sources = []
 n_targets = []
 for i in range(len(sources)):
  if newer(sources[i], targets[i]):
   n_sources.append(sources[i])
   n_targets.append(targets[i])
 return (n_sources, n_targets)

def newer_pairwise ( sources , targets ) : if ( len ( sources ) != len ( targets ) ) : raise ValueError , "'sources' and 'targets' must be same length" n_sources = [ ] n_targets = [ ] for i in range ( len ( sources ) ) : if newer ( sources [ i ] , targets [ i ] ) : n_sources . append ( sources [ i ] ) n_targets . append ( targets [ i ] ) return ( n_sources , n_targets )
walk two filename lists in parallel .