fixed nonmatching variable in comparison functions
This commit is contained in:
parent
c7570b4c4f
commit
d7a4c186c9
|
@ -42,7 +42,7 @@ class Attribute:
|
||||||
return not self == other
|
return not self == other
|
||||||
|
|
||||||
#less than/greater than compare attributes by value, or compare value to int
|
#less than/greater than compare attributes by value, or compare value to int
|
||||||
def __lt__(self, value):
|
def __lt__(self, other):
|
||||||
if isinstance(other, Attribute):
|
if isinstance(other, Attribute):
|
||||||
return self.value < other.value
|
return self.value < other.value
|
||||||
elif isinstance(other, int):
|
elif isinstance(other, int):
|
||||||
|
@ -50,7 +50,7 @@ class Attribute:
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def __le__(self, value):
|
def __le__(self, other):
|
||||||
if isinstance(other, Attribute):
|
if isinstance(other, Attribute):
|
||||||
return self.value <= other.value
|
return self.value <= other.value
|
||||||
elif isinstance(other, int):
|
elif isinstance(other, int):
|
||||||
|
|
Loading…
Reference in a new issue