human
Complete this python program:
def default_iget(fields, default=None):
assistant
#Here is the Python program you requested.

    """itemgetter with \default\ handling, that *always* returns lists
    API CHANGES from ``operator.itemgetter``
    Note: Sorry to break the iget api... (fields vs *fields)
    Note: *always* returns a list... unlike itemgetter,
    which can return tuples or \singles\
    """
    myiget = operator.itemgetter(*fields)
    L = len(fields)
    def f(thing):
        try:
            ans = list(myiget(thing))
            if (L < 2):
                ans = [ans]
            return ans
        except KeyError:
            return [thing.get(x, default) for x in fields]
    f.__doc__ = ('itemgetter    with    default    %r    for    fields    %r' % (default, fields))
    f.__name__ = 'default_itemgetter'
    return f