def arguments(function, extra_arguments=0):
    """Returns the name of all arguments a function takes"""
    if not hasattr(function, '__code__'):
        return ()
    return function.__code__.co_varnames[:function.__code__.co_argcount +
        extra_arguments]
