1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Python compat - map/filter

Differential Revision: https://reviews.llvm.org/D56259

llvm-svn: 350313
This commit is contained in:
Serge Guelton 2019-01-03 14:12:30 +00:00
parent 0c9eaa5247
commit 503314e807
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ def pmap(func, iterable, processes, should_print_progress, *args, **kwargs):
func_and_args = [(func, arg, should_print_progress,) for arg in iterable]
if processes == 1:
result = map(_wrapped_func, func_and_args, *args, **kwargs)
result = list(map(_wrapped_func, func_and_args, *args, **kwargs))
else:
pool = multiprocessing.Pool(initializer=_init,
initargs=(_current, _total,),

View File

@ -39,7 +39,7 @@ def display():
ordered_table = sorted(table.items(), key=operator.itemgetter(0))
ordered_models = ["itinerary", "default"]
ordered_models.extend(sorted(models))
ordered_models = filter(filter_model, ordered_models)
ordered_models = [m for m in ordered_models if filter_model(m)]
# print header
sys.stdout.write("instruction")