Closed jefflongo closed 2 years ago
__or__, __and__, __xor__ are implemented to do intersection, union, symmetric_difference respectively. It feels only natural that __invert__ should be implemented to call complement.
__or__
__and__
__xor__
__invert__
complement
Example expected usage:
>>> r = Range(1, 3) >>> ~x RangeSet{Range[-inf, 1), Range[3, inf)}
__or__
,__and__
,__xor__
are implemented to do intersection, union, symmetric_difference respectively. It feels only natural that__invert__
should be implemented to callcomplement
.Example expected usage: