def get_arguments(callable, exclude):
    info = arginfo(callable)
    defaults = info.defaults or []
    defaults = [None] * (len(info.args) - len(defaults)) + list(defaults)
    return {name: default for (name, default) in zip(info.args, defaults)
            if name not in exclude}
Introspect callable to get callable arguments and their defaults.
dataset/ETHPy150Open morepath/morepath/morepath/path.py/get_arguments