def Range(min=None, max=None, min_message="<STR_LIT>", max_message="<STR_LIT>"):
@wraps(Range)<EOL>def built(value):<EOL><INDENT>if not isinstance(value, numbers.Number) or isinstance(value, bool):<EOL><INDENT>raise Error("<STR_LIT>")<EOL><DEDENT>if min is not None and min > value:<EOL><INDENT>raise Error(min_message.format(min=min, max=max))<EOL><DEDENT>if max is not None and value > max:<EOL><INDENT>raise Error(max_message.format(min=min, max=max))<EOL><DEDENT>return value<EOL><DEDENT>return built<EOL>
Creates a validator that checks if the given numeric value is in the
specified range, inclusive.

Accepts values specified by ``numbers.Number`` only, excluding booleans.

The error messages raised can be customized with ``min_message`` and
``max_message``. The ``min`` and ``max`` arguments are formatted.