Skip to content

Commit

Permalink
Add __slots__ to Currency
Browse files Browse the repository at this point in the history
  • Loading branch information
r4g3baby committed May 27, 2023
1 parent 60df81f commit 60aa08a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions money/currency.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ class Currency:
If the given currency_code isn't a valid ISO 4217 format
"""

__slots__ = ('_code',)

def __init__(self, currency_code):
if not CURRENCY_REGEX.match(currency_code):
raise InvalidCurrencyFormat(currency_code)
Expand Down

0 comments on commit 60aa08a

Please sign in to comment.