def func(**kwargs):
    assert len(kwargs) == 1
argtypename, argval = next(list(kwargs.items()))
obj = arg_parsers[argtypename](argval)
doStuffWithObj(obj)
Elegant pattern for mutually exclusive keyword args?