Implement SeriesIntersection.inverse()
Implement SeriesIntersection.inverse() to return the inverse of the current intersection type
This commit is contained in:
parent
00828ce417
commit
933d11ebc7
1 changed files with 8 additions and 0 deletions
|
@ -17,6 +17,14 @@ class SeriesIntersection(enum.Enum):
|
|||
elif a < b:
|
||||
return SeriesIntersection.LESSER
|
||||
|
||||
def inverse(self):
|
||||
if self is SeriesIntersection.GREATER:
|
||||
return SeriesIntersection.LESSER
|
||||
elif self is SeriesIntersection.LESSER:
|
||||
return SeriesIntersection.GREATER
|
||||
|
||||
return self
|
||||
|
||||
class Series(dict):
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
|
|
Loading…
Add table
Reference in a new issue