def convert(self, value, view):
        """Check that the value is an integer. Floats are rounded.
        """
        if isinstance(value, int):
            return value
        elif isinstance(value, float):
            return int(value)
        else:
            self.fail(u'must be a number', view, True)
def convert ( self , value , view ) : if isinstance ( value , int ) : return value elif isinstance ( value , float ) : return int ( value ) else : self . fail ( u'must be a number' , view , True )
Check that the value is an integer. Floats are rounded.