diff --git a/economicsl/abce.py b/economicsl/abce.py index 0e3bb13..6586288 100644 --- a/economicsl/abce.py +++ b/economicsl/abce.py @@ -25,13 +25,13 @@ def get_difference(self) -> float: class Inventory(defaultdict): def __init__(self) -> None: - # cash defaults to 0.0 - super(Inventory, self).__init__(float) + super().__init__(float) def get_good(self, name: str) -> float: return self[name] - def get_cash(self) -> float: + @property + def cash(self) -> float: return self.get_good("cash") def create(self, name: str, amount) -> None: