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:
parent
0c9eaa5247
commit
503314e807
@ -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,),
|
||||
|
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user