<html>
<body>
on
<a href="http://wiki.python.org/moin/SimplePrograms" eudora="autourl">
http://wiki.python.org/moin/SimplePrograms</a> I found this
code:<br><br>
=======================================<br>
class BankAccount(object):<br>
def __init__(self, initial_balance=0):<br>
self.balance =
initial_balance<br>
def deposit(self, amount):<br>
self.balance += amount<br>
def withdraw(self, amount):<br>
self.balance -= amount<br>
def overdrawn(self):<br>
return self.balance <
0<br>
my_account = BankAccount(15)<br>
my_account.withdraw(5)<br>
print my_account.balance<br>
=========================================<br><br>
This prints the expected "10". <br><br>
My question is, of what use can "overdrawn" be put? If I change
the withdrawal amount to 25, it prints the expected "-10",
whether the class contains the "overdrawn" function or
not.<br><br>
Thanks,<br><br>
Dick Moores</body>
</html>