I think that I would be fine with a threading.run() function which doesn’t accept function keyword arguments, but only threading.Thread keyword arguments:
def run(func, *args, name=None, daemon=None, context=None):
thread = threading.Thread(target=func, args=args,
name=name, daemon=daemon, context=context)
thread.start()
return thread
The asyncio loop.call_soon() has the same limitation. The documentation suggests using functools.partial():
Most asyncio scheduling functions don't allow passing
keyword arguments. To do that, use functools.partial():
# will schedule "print("Hello", flush=True)"
loop.call_soon(
functools.partial(print, "Hello", flush=True))
According to Romain’s message, the kwargs parameter is rarely used.