Take a lists of strings or strings and flatten these into
    a list of strings.

    Arguments:
    - `*args`: "" or [""...]

    Return: [""...]
    Exceptions: None
350737
def _stringlist(*args):
    
    return list(itertools.chain.from_iterable(itertools.repeat(x,1) if stringy(x) else x for x in args if x))
526883
def flatten(l):
    
    l = list(l)
    i = 0
    while i < len(l):
        while isinstance(l[i], list):
            if not l[i]:
                l.pop(i)
                i -= 1
                break
            else:
                l[i:i + 1] = l[i]
        i += 1
    return l
143549
def splitarg(args):
    '''
    
    '''
    if not args:
        return args
    split = list()
    for arg in args:
        if ',' in arg:
            split.extend([x for x in arg.split(',') if x])
        elif arg:
            split.append(arg)
    return split
486398
def assumption_list_string(assumptions, assumption_dict):
    '''

    '''
    if isinstance(assumptions, six.string_types):
        raise TypeError('assumptions must be an iterable of strings, not a '
                        'string itself')
    for a in assumptions:
        if a not in assumption_dict.keys():
            raise ValueError('{} not present in assumption_dict'.format(a))
    assumption_strings = [assumption_dict[a] for a in assumptions]
    return strings_to_list_string(assumption_strings)
693232
def p_string_list(self, p):
        ''''''
        if p[1] is None:
            p[0] = []
        elif len(p) == 4:
            p[1].append(p[3])
            p[0] = p[1]
        elif len(p) == 2:
            p[0] = [p[1]]
389690
def flatten(l):
    '''  '''
    for el in l:
        if isinstance(el, collections.Iterable) and not isinstance(el, string_types):
            for sub in flatten(el):
                yield sub
        else:
            yield el
95383
def flatten_all(list_of_list):
    
    for i in list_of_list:
        if hasattr(i, "__iter__"):
            for j in flatten_all(i):
                yield j
        else:
            yield i
724532
def flatten(items):
    
    for x in items:
        if isinstance(x, Iterable):
            yield from flatten(x)
        else:
            yield x
310070
def stringify(data):
    '''
    
    '''
    ret = []
    for item in data:
        if six.PY2 and isinstance(item, str):
            item = salt.utils.stringutils.to_unicode(item)
        elif not isinstance(item, six.string_types):
            item = six.text_type(item)
        ret.append(item)
    return ret
823567
def flatten(nested):
    
    flat_return = list()

    def __inner_flat(nested,flat):
        for i in nested:
            __inner_flat(i, flat) if isinstance(i, list) else flat.append(i)
        return flat

    __inner_flat(nested,flat_return)

    return flat_return
892562
def actually_flatten(iterable):
    """"""
    remainder = iter(iterable)
    while True:
        first = next(remainder)  # pylint: disable=R1708
        # Python 2/3 compat
        is_iter = isinstance(first, collections.Iterable)
        try:
            basestring
        except NameError:
            basestring = str  # pylint: disable=W0622

        if is_py3() and is_iter and not_a_string(first):
            remainder = IT.chain(first, remainder)
        elif (not is_py3()) and is_iter and not isinstance(first, basestring):
            remainder = IT.chain(first, remainder)
        else:
            yield polite_string(first)
626910
def flatten(items):
    
    for x in items:
        if isinstance(x, Iterable) and not isinstance(x, (str, bytes)):
            for sub_x in flatten(x):
                yield sub_x
        else:
            yield x
417545
def flatten(l, types=(list, float)):
    
    l = [item if isinstance(item, types) else [item] for item in l]
    return [item for sublist in l for item in sublist]
198059
def flatten(self, l):
        """"""
        if l == []:
            return l
        if isinstance(l[0], list):
            return self.flatten(l[0]) + self.flatten(l[1:])
        return l[:1] + self.flatten(l[1:])
1331860
def flatten(self, obj):
        
        return [self._serialize(f, obj) for f in self.fields]
899358
def _flatten(l):
    
    res = []
    for sublist in l:
        if isinstance(sublist, whaaaaat.Separator):
            res.append(sublist)
        else:
            for item in sublist:
                res.append(item)
    return res
130110
def _format_arg_list(args, variadic=False):
    
    def sugar(s):
        """Shorten strings that are too long for decency."""
        s = s.replace("{", "{{").replace("}", "}}")
        if len(s) > 50:
            return s[:20] + " ... " + s[-20:]
        else:
            return s

    def arg_to_str(arg):
        """Convert argument to a string."""
        if isinstance(arg, str):
            return sugar(repr(arg))
        elif arg is Parameter.empty:
            return '\u2014'
        else:
            return sugar(str(arg))

    if not args:
        if variadic:
            return "(\u2026)"
        else:
            return "()"

    return "(" + ", ".join(map(arg_to_str, args)) + ")"