class ChargingAccount (BankAccount):
def __init__(self, initialAmount):
BankAccount.__i nit__(self, initialAmount)
in the above sample bank account is the parent class,i think i understand why the init method is being called from bankaccount,to be able to use self,initial amount from bankaccount right?But if that is so why is it initialised in the child class before initialising it again on the second line.
def __init__(self, initialAmount):
BankAccount.__i nit__(self, initialAmount)
in the above sample bank account is the parent class,i think i understand why the init method is being called from bankaccount,to be able to use self,initial amount from bankaccount right?But if that is so why is it initialised in the child class before initialising it again on the second line.
Comment