14 lines
379 B
Python
14 lines
379 B
Python
import functools
|
|
import threading
|
|
|
|
def thread(func, after, *args, **kwargs):
|
|
func = functools.partial(func, *args, **kwargs)
|
|
call = lambda after, func: after(func())
|
|
t = threading.Thread(
|
|
target = call,
|
|
args = (after, func)
|
|
)
|
|
t.start()
|
|
|
|
def get_missing(required, provided):
|
|
return list(filter(lambda item: item not in provided, required)) |