def is_outside_bounds(self, val):
    """Returns whether the value is outside the bounds or not."""
    return ((self.lower_bound is not None and val < self.lower_bound) or
            (self.upper_bound is not None and val > self.upper_bound))
def is_outside_bounds ( self , val ) : return ( ( self . lower_bound is not None and val < self . lower_bound ) or ( self . upper_bound is not None and val > self . upper_bound ) )
Returns whether the value is outside the bounds or not.