llvm.org GIT mirror llvm / e09ecd0
Python compat - map/filter Differential Revision: https://reviews.llvm.org/D56259 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350313 91177308-0d34-0410-b5e6-96231b3b80d8 Serge Guelton 7 months ago
2 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
4141
4242 func_and_args = [(func, arg, should_print_progress,) for arg in iterable]
4343 if processes == 1:
44 result = map(_wrapped_func, func_and_args, *args, **kwargs)
44 result = list(map(_wrapped_func, func_and_args, *args, **kwargs))
4545 else:
4646 pool = multiprocessing.Pool(initializer=_init,
4747 initargs=(_current, _total,),
3838 ordered_table = sorted(table.items(), key=operator.itemgetter(0))
3939 ordered_models = ["itinerary", "default"]
4040 ordered_models.extend(sorted(models))
41 ordered_models = filter(filter_model, ordered_models)
41 ordered_models = [m for m in ordered_models if filter_model(m)]
4242
4343 # print header
4444 sys.stdout.write("instruction")