def _serialize_iterable(obj):
    """
    Only for serializing list and tuples and stuff.
    Dicts and Strings/Unicode is treated differently.
    String/Unicode normally don't need further serialization and it would cause
    a max recursion error trying to do so.
    :param obj:
    :return:
    """
    if isinstance(obj, (tuple, set)):
        # make a tuple assignable by casting it to list
        obj = list(obj)
    for item in obj:
        obj[obj.index(item)] = serialize_obj(item)
    return obj
def _serialize_iterable ( obj ) : if isinstance ( obj , ( tuple , set ) ) : obj = list ( obj ) for item in obj : obj [ obj . index ( item ) ] = serialize_obj ( item ) return obj
Only for serializing list and tuples and stuff.
    Dicts and Strings/Unicode is treated differently.
    String/Unicode normally don't need further serialization and it would cause
    a max recursion error trying to do so.
    :param obj:
    :return: