def _convert_to_list(self, value):
        if isinstance(value, six.string_types):
            return [value]
        elif value is None:
            return []
        elif isinstance(value, (list, tuple)):
            return value
        try:
            for _n in value:
                break
            return value
        ## @@: Should this catch any other errors?:
        except __HOLE__:
            return [value]
dataset/ETHPy150Open formencode/formencode/formencode/foreach.py/ForEach._convert_to_list