From e228aced1e61b6e7f68abc8483dad2f3752e149d Mon Sep 17 00:00:00 2001 From: rht Date: Wed, 10 Jan 2024 00:52:29 -0500 Subject: [PATCH] Rename get_cash to cash --- economicsl/abce.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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: