TypeError

Steve Holden sholden at holdenweb.com
Wed Aug 29 00:46:16 CEST 2001


"Martijn" <martijn_500 at hotmail.com> wrote in message
news:3B8C04F0.30906 at hotmail.com...
[ ... ]
> It still doesn`t work. This is a code snippet example from Python 2.1
Bible:
>
> class Wallet:
> "where does my money go ?"
> WalletCnt = 0
> def __init__(self,balance = 0):
> self.balance = balance
> Wallet.WalletCnt = Wallet.WalletCnt + 1
> def getPaid(self,amnt):
> self.balance = self.balance +1
> self.display()
>
> def spend(self,amnt):
> self.balance = self.balance -1
> self.display()
>
> def display:
> print 'New Balance: $%.2f; % self.balance
>
>
This is the kind of bible that manufactures agnostics ;-)

regards
 Steve
--
http://www.holdenweb.com/








More information about the Python-list mailing list