def as_list(value):
    """\
    Cast anything to a list (just copy a list or a tuple,
    or put an atomic item to as a single element to a list).
    """
    if isinstance(value, (list, tuple)):
        return list(value)
    return [value]