def listify(*args):
    """
    Convert args to a list, unless there's one arg and it's a
    function, then acts a decorator.
    """
    if (len(args) == 1) and callable(args[0]):
        func = args[0]

        @wraps(func)
        def _inner(*args, **kwargs):
            return list(func(*args, **kwargs))
        return _inner
    else:
        return list(args)
Convert args to a list, unless there's one arg and it's a
    function, then acts a decorator.