From 3d4259e6d0ed01425ba9c35f3866fc298631c9e8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 8 Sep 2004 04:13:02 -0400 Subject: balances and values can now be iterated, to get at the component amounts --- amounts.py | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'amounts.py') 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 -- cgit v1.2.3