aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2017-09-25 14:07:34 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2017-09-25 14:07:34 +0200
commit2daf526b84a1e746a222668f02578a2fdba0e992 (patch)
tree2b7e3a1e8fe21ec5809662810bbdd36ac4ebc426 /src
parent394573a3605ee7ddfe9659c0f91a994436ece91d (diff)
downloadee-python-2daf526b84a1e746a222668f02578a2fdba0e992.tar.gz
ee-python-2daf526b84a1e746a222668f02578a2fdba0e992.tar.bz2
ee-python-2daf526b84a1e746a222668f02578a2fdba0e992.tar.xz
ee-python-2daf526b84a1e746a222668f02578a2fdba0e992.zip
o Better implementation of EeVal's __eq__ and __lt__.
Diffstat (limited to 'src')
-rw-r--r--src/ee/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ee/__init__.py b/src/ee/__init__.py
index 0450c40..1eb79d0 100644
--- a/src/ee/__init__.py
+++ b/src/ee/__init__.py
@@ -60,10 +60,10 @@ class EeVal(object):
return self._unit
def __eq__(self, other):
- return ((self._value, self._unit) == (other._value, other._unit))
+ return ((self.__float__(), self._unit) == (other.__float__(), other._unit))
def __lt__(self, other):
- return ((self._value, self._unit) < (other._value, other._unit))
+ return ((self.__float__(), self._unit) < (other.__float__(), other._unit))
def __str__(self):
return eng_str(self.__float__(), self._unit)