def __init__(self, min_value=None, max_value=None):
if min_value is not None:<EOL><INDENT>assert isinstance(min_value, numbers.Real),'<STR_LIT>'<EOL>if not isinstance(min_value, float):<EOL><INDENT>try:<EOL><INDENT>min_value = float(min_value)<EOL><DEDENT>except OverflowError:<EOL><INDENT>raise AssertionError('<STR_LIT>')<EOL><DEDENT><DEDENT>if self.minimum is not None and min_value < self.minimum:<EOL><INDENT>raise AssertionError('<STR_LIT>'<EOL>'<STR_LIT>' %<EOL>(min_value, self.minimum))<EOL><DEDENT>self.minimum = min_value<EOL><DEDENT>if max_value is not None:<EOL><INDENT>assert isinstance(max_value, numbers.Real),'<STR_LIT>'<EOL>if not isinstance(max_value, float):<EOL><INDENT>try:<EOL><INDENT>max_value = float(max_value)<EOL><DEDENT>except OverflowError:<EOL><INDENT>raise AssertionError('<STR_LIT>')<EOL><DEDENT><DEDENT>if self.maximum is not None and max_value > self.maximum:<EOL><INDENT>raise AssertionError('<STR_LIT>'<EOL>'<STR_LIT>' %<EOL>(max_value, self.maximum))<EOL><DEDENT>self.maximum = max_value<EOL><DEDENT>
A more restrictive minimum or maximum value can be specified than the
range inherent to the defined type.