RestrictRange

class ipkiss3.all.RestrictRange

restrict the argument to a given range

RestrictRange can be applied to any sortable type (type which supports the >, <, <=, >= operators). The lower and upper bounds should be of the same type, and the values tested as well.

Parameters:
lower: (any sortable type)

The lower bound of the range. None for an open boundary

upper: (same sortable type)

The upper bound of the range. None for an open boundary

lower_inc: bool

Speficies whether the lower bound is included (True) or not (False)

upper_inc: bool

Specifies whether the upper bound is included (True) or not (False)

lower
upper
upper_inc
lower_inc