Esempio n. 1
0
 def __init__(self,db_file):
     ''' (Bank,str)-> NoneType
     initialize the Bank database from a file given as argument
     '''
     self._database = set()
     handle = open(db_file,"r")
     lines = handle.readlines()
     for line in lines:
         data = line.split(",")
         p = Person(data[0],data[1],data[2])
         a = BankAccount(p)
         a.credit(int(data[3]))
         self._database.add(a)