def validate ( self, object, name, value ):
        """ Validates that the values is a valid list.
        """
        if not isinstance( value, set ):
            try:
                # Should work for all iterables as well as strings (which do
                # not define an __iter__ method)
                value = set( value )
            except ( ValueError, __HOLE__ ):
                value = set( [ value ] )

        return super( CSet, self ).validate( object, name, value )
dataset/ETHPy150Open enthought/traits/traits/trait_types.py/CSet.validate