Returns the arguments in the list joined by STR.
            IF:CONDITION,DO,ELSE

        %{IF:False,'IS TRUE'} -> ''
        %{IF:True,'IS TRUE', 'NOT TRUE'} -> 'NOT TRUE'
346835
def _dict_if(self, *args):
        
        call_args = list(args)
        do_cond = call_args.pop(0)
        do_if = call_args.pop(0)
        do_else = ''

        if len(call_args):
            do_else = call_args.pop()
        return do_if if self.truth(do_cond) else do_else
359639
def get_cleaned_args(self, args):
        
        if not args:
            return args

        cleaned_args = []
        for arg in args:
            condition = self._get_linguist_condition(arg, True)
            if condition:
                cleaned_args.append(condition)

        return cleaned_args
141737
def findArgs(args, prefixes):
		
		return list([
			arg for arg in args
			if len([p for p in prefixes if arg.lower().startswith(p.lower())]) > 0
		])
986689
def _get_args(self, *args) -> (Exception, str):
        
        ex = None
        msg = None
        for arg in args:
            if isinstance(arg, str):
                msg = arg
            elif isinstance(arg, Exception):
                ex = arg
        return ex, msg
865643
def func_args(func)->bool:
    ""
    code = func.__code__
    return code.co_varnames[:code.co_argcount]
641274
def get_list(self):
        
        result = []

        for key, value in self.parameters.items():

            if value is None:
                continue

            if not isinstance(value, list):
                value = [value]

            if len(key) == 1:
                string_key = '-{}'.format(key)
            else:
                string_key = '--{}'.format(key)

            for sub_value in value:

                if isinstance(sub_value, bool) and sub_value is False:
                    continue

                result.append(string_key)

                if not isinstance(sub_value, bool):
                    if ' ' in sub_value:
                        string_value = "'{}'".format(sub_value)
                    else:
                        string_value = sub_value

                    result.append(str(string_value))

        return result
741178
def get_arguments(self, **include):
        
        d = dict(self._kwargs)

        for k in include:
            if not include[k] and k in d:
                d.pop(k)
        return d
108635
def args_str(self):
        
        matched = [str(m) for m in self._matchers[:self._position]]
        unmatched = [str(m) for m in self._matchers[self._position:]]
        return 'matched=[{}], unmatched=[{}]'.format(
            ', '.join(matched), ', '.join(unmatched))
146443
def argnames(self):
        
        # pylint: disable=no-member; github.com/pycqa/astroid/issues/291
        # args is in fact redefined later on by postinit. Can't be changed
        # to None due to a strong interaction between Lambda and FunctionDef.

        if self.args.args:  # maybe None with builtin functions
            names = _rec_get_names(self.args.args)
        else:
            names = []
        if self.args.vararg:
            names.append(self.args.vararg)
        if self.args.kwarg:
            names.append(self.args.kwarg)
        return names
1131893
def _check_arg(self, arg):
        
        if isinstance(arg, list):
            return self._get_dependencies_from_args(arg)
        elif isinstance(arg, dict):
            return self._get_dependencies_from_kwargs(arg)

        if not is_dependency_name(arg):
            return set()
        return set([arg[1:]])
976934
def extract_args(self, data):
        
        args = []
        data = data.strip(' ')
        if ':' in data:
            lhs, rhs = data.split(':', 1)
            if lhs: args.extend(lhs.rstrip(' ').split(' '))
            args.append(rhs)
        else:
           args.extend(data.split(' '))
        return tuple(args)
362390
def verifyArguments(self, arg):
        
        for l in arg:
            if not type(l) == list and \
               not type(l) == type(Numeric.array([0.0])) and \
               not type(l) == tuple and \
               not type(l) == dict:
                return 0
            if type(l) == dict:
                for i in l:
                    if not type(i) == str and i not in list(self.layers.keys()):
                        return 0
            else:
                for i in l:
                    if not type(i) == float and not type(i) == int:
                        return 0
        return 1
518110
def joinArgs(args):
    
    if not args:
        return ''
    arglist = []
    for key in sorted(args, key=lambda x: x.lower()):
        value = compat.ustr(args[key])
        arglist.append('%s=%s' % (key, compat.quote(value)))
    return '?%s' % '&'.join(arglist)
482214
def append_args(self, arg):
      
      debug.log("Adding Arguments: %s"%(arg))
      if isinstance(arg, (int,float)): self.args.append(str(arg))
      if isinstance(arg, str): self.args.append(arg)
      if isinstance(arg, list):
         if sys.version_info < (3, 0):
            self.args.extend([str(x) if not isinstance(x, (unicode)) else x.encode('utf-8') for x in arg])
         else:
            self.args.extend([str(x) for x in arg])
993738
def has_argument(arg, arguments):
    
    try:
        if not isinstance(arguments, list):
            arguments = arguments.__arguments__
        for idx, (args, kwargs) in enumerate(arguments):
            arg_name = kwargs.get(
                'dest', args[-1].lstrip('-').replace('-', '_'))
            if arg_name == arg:
                return idx
        idx = False
    except (ValueError, AttributeError):
        idx = False
    return idx
51597
def _list_args_kwargs(self):
        

        params = []
        params.extend(self._positional_args)
        params.extend(['{k}={v}'.format(k=k, v=v) for k, v in
                       self._key_value_args.items()])

        return params
928484
def to_args(self):
        
        def has_value(name, value):
            """ Test for non-null option values.
            """
            null_values = ("False", "None", "[]", '""', "''", "0")
            if not value or value in null_values:
                return False
            if name in _arg_defaults:
                if str(value) == str(_arg_defaults[name]):
                    return False
            return True

        def filter_opt(name, value):
            """ Filter out preset and null-valued options.
            """
            if name in ("add_preset", "del_preset", "desc", "note"):
                return False
            return has_value(name, value)

        def argify(name, value):
            """ Convert sos option notation to command line arguments.
            """
            # Handle --verbosity specially
            if name.startswith("verbosity"):
                arg = "-" + int(value) * "v"
                return arg

            name = name.replace("_", "-")

            value = ",".join(value) if _is_seq(value) else value

            if value is not True:
                opt = "%s %s" % (name, value)
            else:
                opt = name

            arg = "--" + opt if len(opt) > 1 else "-" + opt
            return arg

        opt_items = sorted(self.dict().items(), key=lambda x: x[0])
        return [argify(n, v) for (n, v) in opt_items if filter_opt(n, v)]