-from typing import Optional, TypeVar, Tuple
+from decimal import Decimal
+from typing import Optional, Tuple, TypeVar
):
self.strict_mode = strict_mode
if isinstance(amount, str):
):
self.strict_mode = strict_mode
if isinstance(amount, str):
def __add__(self, other):
if isinstance(other, Money):
if self.currency == other.currency:
def __add__(self, other):
if isinstance(other, Money):
if self.currency == other.currency:
)
def __sub__(self, other):
if isinstance(other, Money):
if self.currency == other.currency:
)
def __sub__(self, other):
if isinstance(other, Money):
if self.currency == other.currency:
def __rsub__(self, other):
if isinstance(other, Money):
if self.currency == other.currency:
def __rsub__(self, other):
if isinstance(other, Money):
if self.currency == other.currency:
pass
if amount is not None and currency is not None:
return (amount, currency)
pass
if amount is not None and currency is not None:
return (amount, currency)