Skip to content

Commit

Permalink
Rename get_cash to cash
Browse files Browse the repository at this point in the history
  • Loading branch information
rht committed Jan 10, 2024
1 parent 6157807 commit e228ace
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions economicsl/abce.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e228ace

Please sign in to comment.