pairs input gets handled

This commit is contained in:
Pablo Martin 2025-05-26 15:14:01 +02:00
parent 7cfbe2284d
commit 92eca9e06b
3 changed files with 38 additions and 5 deletions

View file

@ -22,3 +22,9 @@ class CurrencyPair:
return (self.from_currency == other.from_currency) and (
self.to_currency == other.to_currency
)
def __repr__(self):
return str(self)
def __hash__(self):
return hash((self.from_currency, self.to_currency))