def to_list(value):
    if value is None:
        value = []
    elif not isinstance(value, list):
        value = [value]
    return value
Puts value into a list if it's not already one.
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.5/django/test/testcases.py/to_list