summaryrefslogtreecommitdiff
path: root/amounts.py
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2004-09-08 04:13:02 -0400
committerJohn Wiegley <johnw@newartisans.com>2004-09-08 04:13:02 -0400
commit3d4259e6d0ed01425ba9c35f3866fc298631c9e8 (patch)
tree84db5aa52f14aa9d601449b6627891fd21cae42c /amounts.py
parent842359474e36d8406305b874e82c12594dbc154c (diff)
downloadfork-ledger-3d4259e6d0ed01425ba9c35f3866fc298631c9e8.tar.gz
fork-ledger-3d4259e6d0ed01425ba9c35f3866fc298631c9e8.tar.bz2
fork-ledger-3d4259e6d0ed01425ba9c35f3866fc298631c9e8.zip
balances and values can now be iterated, to get at the component amounts
Diffstat (limited to 'amounts.py')
-rw-r--r--amounts.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/amounts.py b/amounts.py
index aa70086c..1d556a1c 100644
--- a/amounts.py
+++ b/amounts.py
@@ -16,3 +16,10 @@ z = Value ("$1000.45")
z += Value(x)
print z
+
+bal = Balance (x)
+bal += Amount ("100.8 DM")
+
+print "balance:", bal
+for amt in bal:
+ print " amount:", amt