Switch from namedtuple to dataclass.
This commit is contained in:
parent
03582cf52a
commit
06e0a32514
1 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
from collections import namedtuple
|
from dataclasses import dataclass
|
||||||
|
from decimal import Decimal
|
||||||
|
|
||||||
Price = namedtuple("Price", ["base", "quote", "date", "amount"])
|
|
||||||
|
@dataclass(frozen=True)
|
||||||
|
class Price:
|
||||||
|
base: str
|
||||||
|
quote: str
|
||||||
|
date: str
|
||||||
|
amount: Decimal
|
||||||
|
|
Loading…
Add table
Reference in a new issue