def validate_args_and_kwargs(fname, args, kwargs, max_fname_arg_count, compat_args):
 _check_arg_length(fname, (args + tuple(kwargs.values())), max_fname_arg_count, compat_args)
 args_dict = dict(zip(compat_args, args))
 for key in args_dict:
  if (key in kwargs):
   raise TypeError("{fname}() got multiple values for keyword argument '{arg}'".format(fname=fname, arg=key))
 kwargs.update(args_dict)
 validate_kwargs(fname, kwargs, compat_args)

def validate_args_and_kwargs ( fname , args , kwargs , max_fname_arg_count , compat_args ) : _check_arg_length ( fname , ( args + tuple ( kwargs . values ( ) ) ) , max_fname_arg_count , compat_args ) args_dict = dict ( zip ( compat_args , args ) ) for key in args_dict : if ( key in kwargs ) : raise TypeError ( "{fname}() got multiple values for keyword argument '{arg}'" . format ( fname = fname , arg = key ) ) kwargs . update ( args_dict ) validate_kwargs ( fname , kwargs , compat_args )
checks whether parameters passed to the *args and **kwargs argument in a function fname are valid parameters as specified in *compat_args and whether or not they are set to their default values .