'When the optional exclude_min and exclude_max attributes are set
to true, the range excludes the end points (i.e., min < value < max),
while if set to False ( the default), then range includes the end points
(1.e., min <= value <= max).  Combinations of exclude_min and exclude_max
values are allowed.'

def __init__(self, message, range_min, range_max, exclude_min=False, exclude_max=False):

    self.min = float((range_min if (range_min is not None) else '-inf'))
    self.exclude_min = util.asbool(exclude_min)
    self.max = float((range_max if (range_max is not None) else 'inf'))
    self.exclude_max = util.asbool(exclude_max)
    assert (self.min <= self.max), 'min    must    be    less    than    or    equal    to    max'
    self_min_str = str(self.min).rstrip('0').rstrip('.')
    self_max_str = str(self.max).rstrip('0').rstrip('.')
    op1 = '>='
    op2 = '<='
    if self.exclude_min:
        op1 = '>'
    if self.exclude_max:
        op2 = '<'
    self.message = (message or ('Value    must    be    %s    %s    and    %s    %s' % (op1, self_min_str, op2, self_max_str)))
