def func_args_as_dict(func, args, kwargs):
 arg_names = list(OrderedDict.fromkeys(itertools.chain(inspect.getargspec(func)[0], kwargs.keys())))
 return OrderedDict((list(six.moves.zip(arg_names, args)) + list(kwargs.items())))

def func_args_as_dict ( func , args , kwargs ) : arg_names = list ( OrderedDict . fromkeys ( itertools . chain ( inspect . getargspec ( func ) [ 0 ] , kwargs . keys ( ) ) ) ) return OrderedDict ( ( list ( six . moves . zip ( arg_names , args ) ) + list ( kwargs . items ( ) ) ) )
return given functions positional and key value arguments as an ordered dictionary .