mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 00:41:05 +03:00
Python runtime: Money division should remain rational (#403)
This commit is contained in:
commit
3c6b96970b
@ -151,7 +151,7 @@ class Money:
|
||||
|
||||
def __truediv__(self, other: 'Money') -> Decimal:
|
||||
if isinstance(other, Money):
|
||||
return Decimal(mpq(self.value.value / other.value.value))
|
||||
return self.value / other.value
|
||||
elif isinstance(other, Decimal):
|
||||
return self * (1. / other.value)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user