Added __int__() method to Value

pull/112/head
Holger Mueller 2019-12-06 19:49:18 +01:00
rodzic b5ca88e2c8
commit 650b107637
1 zmienionych plików z 3 dodań i 0 usunięć

Wyświetl plik

@ -100,6 +100,9 @@ class Value:
return result + fmt.space_str + PREFIXES[offset + 8] + self._unit
def __int__(self):
return round(self._value)
def __float__(self):
return float(self._value)