def __init__( self, operator_string='<', duration=mathtools.Infinity(), ): Inequality.__init__( self, operator_string=operator_string, ) infinities = ( mathtools.Infinity(), mathtools.NegativeInfinity(), ) if duration not in infinities: duration = durationtools.Duration(duration) assert 0 <= duration self._duration = duration
def __init__( self, operator_string='<', length=mathtools.Infinity(), ): Inequality.__init__( self, operator_string=operator_string, ) assert 0 <= length infinities = ( mathtools.Infinity(), mathtools.NegativeInfinity(), ) if length not in infinities: length = int(length) self._length = length