On May 9, 5:25 pm, [EMAIL PROTECTED] wrote: > To test some theories, I created a new class variable, an int named Diez,
Thanks. It is for precisely this reason that I added another class variable - the immutable int N1. But this too keeps getting incremented on subsequent calls to simulation( ). I also tried setting the class variable N1 to 0 at the end of the simulation and also deleting all the stocks in port (see below). Nothing works - and I don't understand why. def simulation(N, par1, par2, idList, returnHistoryDir): port = [] for i in range(N): port.append( Stock(idList[i], returnHistoryDir[idList[i]] ) p[0].NStocks = 0 del port[:] results = ...... print results. -- http://mail.python.org/mailman/listinfo/python-list