def init_fast_validate ( self ):

        from .has_traits import isinterface

        if (self.adapt == 0) and (not isinterface(self.klass)):
            fast_validate = [ 1, self.klass ]
            if self._allow_none:
                fast_validate = [ 1, None, self.klass ]

            if self.klass in TypeTypes:
                fast_validate[0] = 0

            self.fast_validate = tuple( fast_validate )
        else:
            self.fast_validate = ( 19, self.klass, self.adapt,
                                   self._allow_none )
Sets up the C-level fast validator.
dataset/ETHPy150Open enthought/traits/traits/trait_types.py/Instance.init_fast_validate