Re: Creating Class Objects in Loop

2008-03-31 Thread D'Arcy J.M. Cain
On Sun, 30 Mar 2008 21:34:00 -0700 John Nagle <[EMAIL PROTECTED]> wrote: > What's actually happening to you is that you've run into one of the > dumber features of Python - default values for parameters which are > mutable, like lists, result in rather unexpected behavior. The > problem is th

Re: Creating Class Objects in Loop

2008-03-30 Thread John Nagle
Fish wrote: > Hello Folks, > I am reading a CSV file and based on that I am creating TestCase(my > own defined class) objects in a for loop. The problem is each time I > create a new TestCase object in loop, previous objects data is already > copied in that object. What's actually happening to

Re: Creating Class Objects in Loop

2008-03-30 Thread Gabriel Genellina
En Sun, 30 Mar 2008 19:59:14 -0300, Fish <[EMAIL PROTECTED]> escribió: > Hello Folks, > I am reading a CSV file and based on that I am creating TestCase(my > own defined class) objects in a for loop. The problem is each time I > create a new TestCase object in loop, previous objects data is alread

Creating Class Objects in Loop

2008-03-30 Thread Fish
Hello Folks, I am reading a CSV file and based on that I am creating TestCase(my own defined class) objects in a for loop. The problem is each time I create a new TestCase object in loop, previous objects data is already copied in that object. e.g. my sample CSV file is # -