def __new_argv(self, *new_pargs, **new_kargs):
new_argv = self.argv.copy()<EOL>new_extra_argv = list(self.extra_argv)<EOL>for v in new_pargs:<EOL><INDENT>arg_name = None<EOL>for name in self.pargl:<EOL><INDENT>if not name in new_argv:<EOL><INDENT>arg_name = name<EOL>break<EOL><DEDENT><DEDENT>if arg_name:<EOL><INDENT>new_argv[arg_name] = v<EOL><DEDENT>elif self.var_pargs:<EOL><INDENT>new_extra_argv.append(v)<EOL><DEDENT>else:<EOL><INDENT>num_prev_pargs = len([name for name in self.pargl if name in self.argv])<EOL>raise TypeError("<STR_LIT>"% (self.__name__,<EOL>len(self.pargl),<EOL>num_prev_pargs + len(new_pargs)))<EOL><DEDENT><DEDENT>for k,v in new_kargs.items():<EOL><INDENT>if not (self.var_kargs or (k in self.pargl) or (k in self.kargl)):<EOL><INDENT>raise TypeError("<STR_LIT>"% (self.__name__, k))<EOL><DEDENT>new_argv[k] = v<EOL><DEDENT>return (new_argv, new_extra_argv)<EOL>
Calculate new argv and extra_argv values resulting from adding
        the specified positional and keyword arguments.