Is there a rule that you dont enter any self.xxx code if it's not in the init or something. Just trying to understand here.
There is no such rule. The BankAccount object
stores a certain amount of data in it's members self.balance, self.interestrate and self.accountnumber. These values can be used in all the methods of the class.In your method "withdraw", the parameter "amount" is just a temporary value which is not stored in the BankAccount object.
Last edited by Gribouillis; Oct 13th, 2009 at 9:03 am.
Reputation Points: 930
Solved Threads: 668
Posting Maven
Offline 2,656 posts
since Jul 2008