pymodeler/parameter.py
def check_type(self, value):
        """Hook for type-checking, invoked during assignment.

        raises TypeError if neither value nor self.dtype are None and they
        do not match.

        will not raise an exception if either value or self.dtype is None
        """
        if self.__dict__['dtype'] is None:
            return
        elif value is None:
            return
        elif isinstance(value, self.__dict__['dtype']):
            return
        msg = "Value of type %s, when %s was expected." % (
            type(value), self.__dict__['dtype'])
        raise TypeError(msg)
def check_type(self, value):
        """Hook for type-checking, invoked during assignment.

        raises TypeError if neither value nor self.dtype are None and they
        do not match.

        will not raise an exception if either value or self.dtype is None
        """
        if self.__dict__['dtype'] is None:
            return
        elif value is None:
            return
        elif isinstance(value, self.__dict__['dtype']):
            return
        msg = "Value of type %s, when %s was expected." % (
            type(value), self.__dict__['dtype'])
        raise TypeError(msg)
Hook for type-checking, invoked during assignment.

        raises TypeError if neither value nor self.dtype are None and they
        do not match.

        will not raise an exception if either value or self.dtype is None