(obj)
Wraps a passed object into a list in case it has not been a list, tuple before.
    Returns an empty list in case ``obj`` is None.
    Args:
        obj: instance to be converted into a list.
    Returns:
        list: May also return a tuple in case ``obj`` has been a tuple before.
Wraps a passed object into a list in case it has not been a list, tuple before.
    Returns an empty list in case ``obj`` is None.
    Args:
        obj: instance to be converted into a list.
    Returns:
        list: May also return a tuple in case ``obj`` has been a tuple before.
Wraps a passed object into a list in case it has not been a list tuple before . Returns an empty list in case obj is None . Args : obj : instance to be converted into a list . Returns : list : May also return a tuple in case obj has been a tuple before .
def listify(obj):
    """Wraps a passed object into a list in case it has not been a list, tuple before.
    Returns an empty list in case ``obj`` is None.
    Args:
        obj: instance to be converted into a list.
    Returns:
        list: May also return a tuple in case ``obj`` has been a tuple before.
    """
    if obj is None:
        return []

    try:
        return obj if isinstance(obj, (list, tuple, EnumMeta)) else [obj]
    except ReferenceError:
        # obj is an empty weakref
        return [obj]
def listify ( obj ) : if obj is None : return [ ] try : return obj if isinstance ( obj , ( list , tuple , EnumMeta ) ) else [ obj ] except ReferenceError : # obj is an empty weakref return [ obj ]