def validate ( self, object, name, value ):
        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, TypeError ):
                value = set( [ value ] )

        return super( CSet, self ).validate( object, name, value )
Validates that the values is a valid list.
dataset/ETHPy150Open enthought/traits/traits/trait_types.py/CSet.validate