Enable Size comparisons in pyocf
Signed-off-by: Jan Musial <jan.musial@intel.com>
This commit is contained in:
parent
021e7e87ad
commit
96124ca87a
@ -82,6 +82,24 @@ class Size:
|
|||||||
else:
|
else:
|
||||||
self.bytes = int(b)
|
self.bytes = int(b)
|
||||||
|
|
||||||
|
def __lt__(self, other):
|
||||||
|
return int(self) < int(other)
|
||||||
|
|
||||||
|
def __le__(self, other):
|
||||||
|
return int(self) <= int(other)
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
return int(self) == int(other)
|
||||||
|
|
||||||
|
def __ne__(self, other):
|
||||||
|
return int(self) != int(other)
|
||||||
|
|
||||||
|
def __gt__(self, other):
|
||||||
|
return int(self) > int(other)
|
||||||
|
|
||||||
|
def __ge__(self, other):
|
||||||
|
return int(self) >= int(other)
|
||||||
|
|
||||||
def __int__(self):
|
def __int__(self):
|
||||||
return self.bytes
|
return self.bytes
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user